code: def traverse_parents(self, visit, *args, **kwargs):
          
          if self.has_parent():
              self.__visited = True
              self._parent_.traverse_parents(visit, *args, **kwargs)
              self._parent_.traverse(visit, *args, **kwargs)
              self.__visited = False
docs: Traverse the hierarchy upwards, visiting all parents and their children except self.
          See "visitor pattern" in literature. This is implemented in pre-order fashion.
  
          Example:
  
          parents = []
          self.traverse_parents(parents.append)
          print parents