private void prettyPrint(final StringBuilder builder, final String prefix) {
        for (Map.Entry<T, Tree<T>> entry : this.entrySet()) {
            builder.append(prefix).append("|--").append(entry.getKey());
            builder.append(System.lineSeparator());
            entry.getValue().prettyPrint(builder, prefix + "   ");
        }
    }
Produce a formatted string representation of the tree structure.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Tree.java