code: def controller_name(cls, _remove_suffixes=None) -> str:
      
      name = cls if isinstance(cls, str) else cls.__name__
      remove_suffixes = _remove_suffixes or getattr(cls, REMOVE_SUFFIXES_ATTR)
      for suffix in remove_suffixes:
          if name.endswith(suffix):
              name = right_replace(name, suffix, '')
              break
      return snake_case(name)
docs: Returns the snake-cased name for a controller/resource class. Automatically
      strips ``Controller``, ``View``, and ``MethodView`` suffixes, eg::
  
          SiteController -> site
          FooBarBazView -> foo_bar_baz
          UsersMethodView -> users