async def METHOD_NAME(request: Request, handler: RequestHandler) -> StreamResponse:
    if api_handler.in_shutdown:
        # We are currently in shutdown: inform the caller to retry later.
        return HTTPServiceUnavailable(headers={"Retry-After": "5"})
    else:
        return await handler(request)