async def METHOD_NAME(
    async_client: AsyncClientWithRetry,
    aioresponses_mock: aioresponses_mock,
    method: str,
    status_codes: typing.List[http.HTTPStatus],
):
    for status_code in status_codes:
        aioresponses_mock.add("http://nothinghere", method=method, status=status_code)
    response = await async_client.request(method, "http://nothinghere")
    assert response.status == status_codes[-1], "response status is not as expected"
    # ensure we called the request the correct number of times
    assert aioresponses_mock.called_times() == len(
        status_codes
    ), "Wrong number of retries"