def METHOD_NAME(
    study_object_id, participant_ids=None, limit=None,  # basics
    end_date=None, start_date=None,                     # time
    ordered_by="date", order_direction="default",       # sort
    query_fields: List[str] = None,
    **_  # Because Whimsy is important.                 # ignore everything else
) -> TableauApiPaginator:
    """ Args:
        study_object_id (str): study in which to find data
        end_date (optional[date]): last date to include in search
        start_date (optional[date]): first date to include in search
        limit (optional[int]): maximum number of data points to return
        order_by (str): parameter to sort output by. Must be one in the list of fields to return
        order_direction (str): order to sort in, either "ascending" or "descending"
        participant_ids (optional[list[str]]): a list of participants to limit the search to
    Returns EfficientPaginator of the SummaryStatisticsDaily objects specified by the parameters """
    if not query_fields:
        raise Exception("invalid usage")
    # Set up filter, order_by, and annotation quargs
    filter_kwargs = {}
    filter_kwargs["participant__study__object_id"] = study_object_id
    if participant_ids:
        filter_kwargs["participant__patient_id__in"] = participant_ids
    if end_date:
        filter_kwargs["date__lte"] = end_date
    if start_date:
        filter_kwargs["date__gte"] = start_date
    # particpant_id needs to be remapped to patient_id
    if ordered_by == "participant_id":
        ordered_by = "patient_id"  # participant__patient_id also works, participant_id does not
    # default ordering for date (which is itself the default oreding) is most recent first
    if order_direction == "default" and ordered_by == "date":
        order_direction = "descending"
    elif order_direction == "default":
        order_direction = "ascending"
    if order_direction == "descending":
        ordered_by = "-" + ordered_by
    # Set up annotation to rename the study's object_id the "study_id"
    annotate_kwargs = {"study_id": F("participant__study__object_id")}
    if "participant_id" in query_fields:
        # need to replace participant_id with patient_id, we have to swap it back later
        query_fields[query_fields.index("participant_id")] = "patient_id"
        annotate_kwargs["patient_id"] = F("participant__patient_id")
    # construct query, apply limit if any, pass to paginator with large page size and return.
    query = SummaryStatisticDaily.objects \
        .annotate(**annotate_kwargs).order_by(ordered_by).filter(**filter_kwargs)
    return TableauApiPaginator(query, 10000, values=query_fields, limit=limit)