def METHOD_NAME(name, reports_ref, project_ref, customer_ref, task_ref):
    reports_prefix = f"{reports_ref}__" if reports_ref else ""
    project_prefix = f"{project_ref}__" if project_ref else ""
    customer_prefix = f"{customer_ref}__" if customer_ref else ""
    task_prefix = f"{task_ref}__" if task_ref else ""
    return type(
        name,
        (StatisticFiltersetBase, FilterSet),
        {
            "_refs": {
                "reports_prefix": reports_prefix,
                "project_prefix": project_prefix,
                "customer_prefix": customer_prefix,
                "task_prefix": task_prefix,
                "reports_ref": reports_ref,
                "project_ref": project_ref,
                "customer_ref": customer_ref,
                "task_ref": task_ref,
            },
            "from_date": DateFilter(
                field_name=f"{reports_prefix}date", lookup_expr="gte"
            ),
            "to_date": DateFilter(
                field_name=f"{reports_prefix}date", lookup_expr="lte"
            ),
            "project": NumberFilter(field_name=f"{project_prefix}pk"),
            "customer": NumberFilter(field_name=f"{customer_prefix}pk"),
            "review": NumberFilter(field_name=f"{reports_prefix}review"),
            "not_billable": NumberFilter(field_name=f"{reports_prefix}not_billable"),
            "billed": NumberFilter(field_name=f"{reports_prefix}billed"),
            "verified": NumberFilter(
                field_name=f"{reports_prefix}verified_by_id",
                lookup_expr="isnull",
                exclude=True,
            ),
            "verifier": NumberFilter(field_name=f"{reports_prefix}verified_by"),
            "billing_type": NumberFilter(field_name=f"{project_prefix}billing_type"),
            "user": NumberFilter(field_name=f"{reports_prefix}user_id"),
            "rejected": NumberFilter(field_name=f"{reports_prefix}rejected"),
            "id": BaseInFilter(),
            "cost_center": NumberFilter(method="filter_cost_center"),
            "reviewer": NumberFilter(method="filter_has_reviewer"),
        },
    )