code: def baseclass(self):
          
          for cls in _BASE_CLASSES:
              if isinstance(self, cls):
                  return cls
  
          raise ValueError("Cannot determine the base class of %s" % self.__class__.__name__)
docs: The baseclass of self.