def METHOD_NAME(
    auth_client,
    is_employed,
    is_customer_assignee,
    is_customer,
    expected,
    status_code,
    django_assert_num_queries,
):
    user = auth_client.user
    setup_customer_and_employment_status(
        user=user,
        is_assignee=is_customer_assignee,
        is_customer=is_customer,
        is_employed=is_employed,
        is_external=False,
    )
    task_z = TaskFactory.create(name="Z")
    task_test = TaskFactory.create(name="Test")
    ReportFactory.create(duration=timedelta(hours=1), task=task_test)
    ReportFactory.create(duration=timedelta(hours=2), task=task_test)
    ReportFactory.create(duration=timedelta(hours=2), task=task_z)
    url = reverse("task-statistic-list")
    with django_assert_num_queries(expected):
        result = auth_client.get(
            url,
            data={
                "ordering": "name",
                "include": "project,project.customer",
            },
        )
    assert result.status_code == status_code
    if status_code == status.HTTP_200_OK:
        json = result.json()
        expected_json = [
            {
                "type": "task-statistics",
                "id": str(task_test.id),
                "attributes": {
                    "duration": "03:00:00",
                    "name": str(task_test.name),
                    "most-recent-remaining-effort": None,
                    "estimated-time": "00:00:00",
                },
                "relationships": {
                    "project": {
                        "data": {"id": str(task_test.project.id), "type": "projects"}
                    }
                },
            },
            {
                "type": "task-statistics",
                "id": str(task_z.id),
                "attributes": {
                    "duration": "02:00:00",
                    "name": str(task_z.name),
                    "most-recent-remaining-effort": None,
                    "estimated-time": "00:00:00",
                },
                "relationships": {
                    "project": {
                        "data": {"id": str(task_z.project.id), "type": "projects"}
                    }
                },
            },
        ]
        assert json["data"] == expected_json
        assert json["meta"]["total-time"] == "05:00:00"