'Return a flat version of the tree, with all non-root non-terminals removed.
>>> t = Tree.fromstring("(S (NP (D the) (N dog)) (VP (V chased) (NP (D the) (N cat))))")
>>> print(t.flatten())
(S the dog chased the cat)
:return: a tree consisting of this tree\'s root connected directly to
its leaves, omitting all intervening non-terminal nodes.
:rtype: Tree'

def flatten(self):

    return Tree(self.label(), self.leaves())
