def METHOD_NAME(
    server_routes: web.RouteTableDef, task_context_decorator
) -> web.Application:
    app = web.Application()
    app.add_routes(server_routes)
    # this adds enveloping and error middlewares
    append_rest_middlewares(app, api_version="")
    long_running_tasks.server.setup(
        app,
        router_prefix="/futures_with_task_context",
        task_request_context_decorator=task_context_decorator,
    )
    return app