public List<Tree<T>> splitParents() {
        if (this.keySet().size() == 1) {
            return Collections.singletonList(this);
        } else {
            final List<Tree<T>> parents = new ArrayList<>();
            this.forEach((k, t) -> {
                final Tree<T> parentTree = new Tree<>();
                parentTree.put(k, t);
                parents.add(parentTree);
            });
            return parents;
        }
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Tree.java