code: def _is_descendant_of(self, parent):
          
          if self.parent is None:
              return False
          if self.parent == parent:
              return True
          return self.parent._is_descendant_of(parent)
docs: Returns True if parent is in the list of ancestors, returns False
          otherwise.
  
          :type  parent: Task
          :param parent: The parent that is searched in the ancestors.
          :rtype:  bool
          :returns: Whether the parent was found.