public static String stepString(final Step<?, ?> step, final Object... arguments) {
        final StringBuilder builder = new StringBuilder(step.getClass().getSimpleName());
        final List<String> strings = Stream.of(arguments)
                .filter(o -> {
                    if (o instanceof TraversalRing)
                        return !((TraversalRing) o).isEmpty();
                    else if (o instanceof Collection)
                        return !((Collection) o).isEmpty();
                    else if (o instanceof Map)
                        return !((Map) o).isEmpty();
                    else
                        return !Objects.toString(o).isEmpty();
                })
                .map(o -> {
                    final String string = Objects.toString(o);
                    return hasLambda(string) ? "lambda" : string;
                }).collect(Collectors.toList());
        if (!strings.isEmpty()) {
            builder.append('(');
            builder.append(String.join(",", strings));
            builder.append(')');
        }
        if (!step.getLabels().isEmpty()) builder.append('@').append(step.getLabels());
        return builder.toString();
    }
Construct the representation for a {@link Graph}.

@param internalString a mapper {@link String} that appends to the end of the standard representation
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/StringFactory.java