def pformat(tree):
if tree.empty():<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>buf = six.StringIO()<EOL>for line in _pformat(tree.root, <NUM_LIT:0>):<EOL><INDENT>buf.write(line + "<STR_LIT:\n>")<EOL><DEDENT>return buf.getvalue().strip()<EOL>
Recursively formats a tree into a nice string representation.

    Example Input:
     yahoo = tt.Tree(tt.Node("CEO"))
     yahoo.root.add(tt.Node("Infra"))
     yahoo.root[0].add(tt.Node("Boss"))
     yahoo.root[0][0].add(tt.Node("Me"))
     yahoo.root.add(tt.Node("Mobile"))
     yahoo.root.add(tt.Node("Mail"))

    Example Output:
     CEO
     |__Infra
     |  |__Boss
     |     |__Me
     |__Mobile
     |__Mail