def METHOD_NAME(page_size, expected_pages, expected_items):
    response = build_paged_responses(page_size, expected_pages, expected_items)
    client = GcomAPIClient("someToken")
    pages = []
    items = 0
    with patch(
        "apps.grafana_plugin.helpers.client.APIClient.api_get",
        side_effect=response,
    ):
        instance_pages = client.get_instances("", page_size)
        for page in instance_pages:
            pages.append(page)
            items += len(page.get("items", []))
    assert len(pages) == expected_pages
    assert items == expected_items