'The root of this tree.  I.e., the unique ancestor of this tree
whose parent is None.  If ``ptree.parent()`` is None, then
``ptree`` is its own root.'

def root(self):

    root = self
    while (root.parent() is not None):
        root = root.parent()
    return root
