code: def get_middleware_resolvers(middlewares):
      for middleware in middlewares:
          # If the middleware is a function instead of a class
          if inspect.isfunction(middleware):
              yield middleware
          if not hasattr(middleware, MIDDLEWARE_RESOLVER_FUNCTION):
              continue
          yield getattr(middleware, MIDDLEWARE_RESOLVER_FUNCTION)
  
file_path: wandb/wandb/vendor/graphql-core-1.1/wandb_graphql/execution/middleware.py
imports: import inspect
  from functools import partial
  from itertools import chain
  from wandb_promise import Promise
label_desc: Use image node_id 1 for calling a global function with example usage: get_middleware_resolvers(middlewares) without return types