code: def ancestor(self, *Classes):
          
          for e in self.ancestors(tuple(Classes)):
              return e
          raise NoSuchAnnotation
docs: Find the most immediate ancestor of the specified type, multiple classes may be specified.
  
          Arguments:
              *Classes: The possible classes (:class:`AbstractElement` or subclasses) to select from. Not instances!
  
          Example::
  
              paragraph = word.ancestor(folia.Paragraph)