<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pformat(tree):
 """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 """

    if tree.empty():
        return ''
    buf = six.StringIO()
    for line in _pformat(tree.root, 0):
        buf.write(line + "\n")
    return buf.getvalue().strip()