def _parents(self):
    node = self.parent
    while node:
        (yield node)
        node = node.parent
def _parents(self):
    node = self.parent
    while node:
        (yield node)
        node = node.parent