def METHOD_NAME(
    auth_client,
    is_employed,
    is_customer_assignee,
    is_customer,
    expected,
    status_code,
    django_assert_num_queries,
):
    user = auth_client.user
    assignee, employment = setup_customer_and_employment_status(
        user=user,
        is_assignee=is_customer_assignee,
        is_customer=is_customer,
        is_employed=is_employed,
        is_external=False,
    )
    # Statistics returns all the customers, not only those
    # with reports. So we must get this one into the expected
    # list as well
    third_customer = assignee.customer if assignee else None
    report = ReportFactory.create(duration=timedelta(hours=1))
    ReportFactory.create(duration=timedelta(hours=2), task=report.task)
    report2 = ReportFactory.create(duration=timedelta(hours=4))
    url = reverse("customer-statistic-list")
    with django_assert_num_queries(expected):
        result = auth_client.get(url, data={"ordering": "duration"})
    assert result.status_code == status_code
    if status_code == status.HTTP_200_OK:
        json = result.json()
        expected_data = [
            {
                "type": "customer-statistics",
                "id": str(report.task.project.customer.id),
                "attributes": {
                    "duration": "03:00:00",
                    "name": report.task.project.customer.name,
                },
            },
            {
                "type": "customer-statistics",
                "id": str(report2.task.project.customer.id),
                "attributes": {
                    "duration": "04:00:00",
                    "name": report2.task.project.customer.name,
                },
            },
        ]
        if third_customer:
            expected_data = [
                {
                    "type": "customer-statistics",
                    "id": str(third_customer.pk),
                    "attributes": {
                        "duration": "00:00:00",
                        "name": third_customer.name,
                    },
                }
            ] + expected_data
        assert json["data"] == expected_data
        assert json["meta"]["total-time"] == "07:00:00"