def _get_response_status(response) -> int:
    """Get the HTTP status code from any type of response object."""
    if hasattr(response, "status"):
        # aiohttp-style
        return response.status
    elif hasattr(response, "status_code"):
        # starlette-style
        return response.status_code
    raise TypeError(f"Don't know how to find the path for {type(response)}")