public static void attachProperties(final Vertex vertex, final Object... propertyKeyValues) {
        if (null == vertex)
            throw Graph.Exceptions.argumentCanNotBeNull("vertex");

        final boolean allowNullPropertyValues = vertex.graph().features().vertex().supportsNullPropertyValues();

        for (int i = 0; i < propertyKeyValues.length; i = i + 2) {
            if (!propertyKeyValues[i].equals(T.id) && !propertyKeyValues[i].equals(T.label))
                if (!allowNullPropertyValues && null == propertyKeyValues[i + 1])
                    vertex.properties(((String) propertyKeyValues[i])).forEachRemaining(VertexProperty::remove);
                else
                    vertex.property(vertex.graph().features().vertex().getCardinality((String) propertyKeyValues[i]), (String) propertyKeyValues[i], propertyKeyValues[i + 1]);
        }
    }
Assign key/value pairs as properties to an {@link Vertex}.  If the value of {@link T#id} or {@link T#label} is
in the set of pairs, then they are ignored. The {@link VertexProperty.Cardinality} of the key is determined from
the {@link Graph.Features.VertexFeatures}.

@param vertex            the graph vertex to assign the {@code propertyKeyValues}
@param propertyKeyValues the key/value pairs to assign to the {@code element}
@throws ClassCastException       if the value of the key is not a {@link String}
@throws IllegalArgumentException if the value of {@code element} is null
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/ElementHelper.java