<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def middleware_in_executor(middleware):
    '''Use this middleware to run a synchronous middleware in the event loop
    executor.

    Useful when using synchronous web-frameworks such as :django:`django <>`.
    '''
    @wraps(middleware)
    def _(environ, start_response):
        loop = get_event_loop()
        return loop.run_in_executor(None, middleware, environ, start_response)

    return _