public static VertexProperty createVertexProperty(final Attachable<VertexProperty> attachableVertexProperty, final Vertex hostVertex) {
            final VertexProperty<Object> baseVertexProperty = attachableVertexProperty.get();
            final VertexProperty vertexProperty = hostVertex.graph().features().vertex().properties().willAllowId(baseVertexProperty.id()) ?
                    hostVertex.property(hostVertex.graph().features().vertex().getCardinality(baseVertexProperty.key()), baseVertexProperty.key(), baseVertexProperty.value(), T.id, baseVertexProperty.id()) :
                    hostVertex.property(hostVertex.graph().features().vertex().getCardinality(baseVertexProperty.key()), baseVertexProperty.key(), baseVertexProperty.value());
            baseVertexProperty.properties().forEachRemaining(p -> vertexProperty.property(p.key(), p.value()));
            return vertexProperty;
        }
A collection of general methods of attachment. Note that more efficient methods of attachment might exist
if the user knows the source data being attached and the features of the graph that the data is being
attached to.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/Attachable.java