code: public static <T extends GraphNode<T>> String printTree(T node, Formatter<T> formatter,
                                                              Predicate<T> nodeFilter,
                                                              Predicate<T> subTreeFilter) {
          checkArgNotNull(formatter, "formatter");
          checkArgNotNull(nodeFilter, "nodeFilter");
          checkArgNotNull(subTreeFilter, "subTreeFilter");
          return node == null ? "" :
                  printTree(node, formatter, "", new StringBuilder(), nodeFilter, subTreeFilter).toString();
      }
docs: Creates a string representation of the graph reachable from the given node using the given formatter.
  The given filter predicated determines whether a particular node (and its subtree respectively) is to be
  printed or not.
  
  @param node          the root node
  @param formatter     the node formatter
  @param nodeFilter    the predicate selecting the nodes to print
  @param subTreeFilter the predicate determining whether to descend into a given nodes subtree or not
  @return a new string