@Override
        public <O extends OutputShim> void write(final KryoShim<?, O> kryo, final O output, final Edge edge) {
            kryo.writeClassAndObject(output, edge.id());
            output.writeString(edge.label());
            kryo.writeClassAndObject(output, edge.inVertex().id());

            // temporary try/catch perhaps? need this to get SparkSingleIterationStrategyTest to work. Trying to grab
            // the label of the adjacent vertex ends in error if there's a StarEdge in the ComputerGraph$ComputerEdge.
            // apparently this is how we handle things in DetachedElement. i'll write here in the comments what was
            // written there:
            //
            // ghetto
            try {
                output.writeString(edge.inVertex().label());
            } catch (Exception ex) {
                output.writeString(Vertex.DEFAULT_LABEL);
            }

            kryo.writeClassAndObject(output, edge.outVertex().id());

            // same nonsense as above for a default label
            try {
                output.writeString(edge.outVertex().label());
            } catch (Exception ex) {
                output.writeString(Vertex.DEFAULT_LABEL);
            }

            writeElementProperties(kryo, output, edge);
        }
Serializes any {@link Edge} implementation encountered to a {@link DetachedEdge}.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoSerializersV3.java