code: def _get_def_class(self, class_obj, member_name):
          
          member_obj = getattr(class_obj, member_name)
          for def_class_obj in inspect.getmro(class_obj):
              if member_name in def_class_obj.__dict__:
                  if def_class_obj.__name__ in self._excluded_classes:
                      return class_obj  # Fall back to input class
                  return def_class_obj
          self._logger.warning(
              "%s: Definition class not found for member %s.%s, "
              "defaulting to class %s",
              self._log_prefix, class_obj.__name__, member_name,
              class_obj.__name__)
          return class_obj
docs: Return the class object in MRO order that defines a member.
  
          class_obj: Class object that exposes (but not necessarily defines) the
            member. I.e. starting point of the search.
  
          member_name: Name of the member (method or attribute).
  
          Returns:
            Class object that defines the member.