<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def combine_middlewares(middlewares, web3, provider_request_fn):
 """ Returns a callable function which will call the provider.provider_request function wrapped with all of the middlewares. """

    return functools.reduce(
        lambda request_fn, middleware: middleware(request_fn, web3),
        reversed(middlewares),
        provider_request_fn,
    )