@Override
    public int compare(final Step<?, ?> step1, final Step<?, ?> step2) {
        return getDepth(step2) - getDepth(step1);
    }
A {@code Comparator} that compares steps on the depth of the traversal that they are in.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/DepthComparator.java