code: def iter_ancestors(self):
          
          node = self
          while node.up is not None:
              yield node.up
              node = node.up
docs: Iterates over the list of all ancestor nodes from 
          current node to the current tree root.