def _is_descendant_of(self, parent):
if self.parent is None:<EOL><INDENT>return False<EOL><DEDENT>if self.parent == parent:<EOL><INDENT>return True<EOL><DEDENT>return self.parent._is_descendant_of(parent)<EOL>
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.