<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def word_wrap_tree(parented_tree, width=0):
 """line-wrap an NLTK ParentedTree for pretty-printing"""

    if width != 0:
        for i, leaf_text in enumerate(parented_tree.leaves()):
            dedented_text = textwrap.dedent(leaf_text).strip()
            parented_tree[parented_tree.leaf_treeposition(i)] = textwrap.fill(dedented_text, width=width)
    return parented_tree