code: async def process_response(
          self,
          response: Response,
          request_context: Optional[RequestContext]=None,
      ) -> Response:
          
          request_ = (request_context or _request_ctx_stack.top).request
          functions = (request_context or _request_ctx_stack.top)._after_request_functions
          blueprint = request_.blueprint
          if blueprint is not None:
              functions = chain(functions, self.after_request_funcs[blueprint])
          functions = chain(functions, self.after_request_funcs[None])
  
          for function in functions:
              response = await function(response)
  
          session_ = (request_context or _request_ctx_stack.top).session
          if not self.session_interface.is_null_session(session_):
              await self.save_session(session_, response)
          return response
docs: Postprocess the request acting on the response.
  
          Arguments:
              response: The response after the request is finalized.
              request_context: The request context, optional as Flask
                  omits this argument.