code: def auto_override_class(cls, force = False, force_recursive = False):
      
      if not pytypes.checking_enabled:
          return cls
      assert(isclass(cls))
      if not force and is_no_type_check(cls):
          return cls
      # To play it safe we avoid to modify the dict while iterating over it,
      # so we previously cache keys.
      # For this we don't use keys() because of Python 3.
      # Todo: Better use inspect.getmembers here
      keys = [key for key in cls.__dict__]
      for key in keys:
          memb = cls.__dict__[key]
          if force_recursive or not is_no_type_check(memb):
              if isfunction(memb) or ismethod(memb) or ismethoddescriptor(memb):
                  if util._has_base_method(memb, cls):
                      setattr(cls, key, override(memb))
              elif isclass(memb):
                  auto_override_class(memb, force_recursive, force_recursive)
      return cls
docs: Works like auto_override, but is only applicable to classes.