def callback_middleware(app):
    def callback_wrapper(environ, start_response):
        """Call the WSGI app and then invoke the request-end callbacks."""
        try:
            return app(environ, start_response)
        finally:
            callback.InvokeCallbacks()

    return callback_wrapper
Calls the request-endcallback that the app may have set
dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-vmruntime/vmruntime/middleware.py/callback_middleware