code: def combine_middlewares(middlewares, web3, provider_request_fn):
      
      return functools.reduce(
          lambda request_fn, middleware: middleware(request_fn, web3),
          reversed(middlewares),
          provider_request_fn,
      )
docs: Returns a callable function which will call the provider.provider_request
      function wrapped with all of the middlewares.