def METHOD_NAME(request, **kwargs):
    assert "tenant_id" not in kwargs
    assert "claims" not in kwargs
    try:
        expected_request, response = next(sessions)
    except StopIteration:
        assert False, "unexpected request: {} {}".format(request.method, request.url)
    expected_request.assert_matches(request)
    return response