docs: def commonancestors(Class, *args):
      """Generator function to find common ancestors of a particular type for any two or more FoLiA element instances.
  
      The function produces all common ancestors of the type specified, starting from the closest one up to the most distant one.
  
      Parameters:
          Class: The type of ancestor to find, should be the :class:`AbstractElement` class or any subclass thereof (not an instance!)
          *args: The elements to find the common ancestors of, elements are instances derived from :class:`AbstractElement`
  
      Yields:
          instance derived from :class:`AbstractElement`: A common ancestor of the arguments, an instance of the specified ``Class``.
      """
  
      commonancestors = None #pylint: disable=redefined-outer-name
      for sibling in args:
          ancestors = list( sibling.ancestors(Class) )
          if commonancestors is None:
              commonancestors = copy(ancestors)
          else:
              removeancestors = []
              for a in commonancestors: #pylint: disable=not-an-iterable
                  if not a in ancestors:
                      removeancestors.append(a)
              for a in removeancestors:
                  commonancestors.remove(a)
      if commonancestors:
          for commonancestor in commonancestors:
              yield commonancestor