code: def _find_ancestor_from_name(self, name):
          
          if self.parent is None:
              return None
          if self.parent.get_name() == name:
              return self.parent
          return self.parent._find_ancestor_from_name(name)
docs: Returns the ancestor that has a task with the given name assigned.
          Returns None if no such ancestor was found.
  
          :type  name: str
          :param name: The name of the wanted task.
          :rtype:  Task
          :returns: The ancestor.