code: def get_middleware_resolvers(middlewares: Tuple[Any, ...]) -> Iterator[Callable]:
      
      for middleware in middlewares:
          if isfunction(middleware):
              yield middleware
          else:  # middleware provided as object with 'resolve' method
              resolver_func = getattr(middleware, "resolve", None)
              if resolver_func is not None:
                  yield resolver_func
docs: Get a list of resolver functions from a list of classes or functions.