docs: def instance(cls) -> 'MiddlewareManager':
          """
          Creates, initializes and returns a unique MiddlewareManager instance.
          """
  
          if cls._instance is None:
              cls._instance = cls()
              cls._instance.init()
          return cls._instance