def METHOD_NAME(self, ancestor_array, filter_string) -> list:
    filters = [
        Q(has_faba=True),
    ]
    if len(ancestor_array) > 0:
        agency = ancestor_array[0]
        filters.append(Q(agency=agency))
    if len(ancestor_array) > 1:
        fed_account = ancestor_array[1]
        filters.append(Q(federal_account__federal_account_code=fed_account))
    if filter_string:
        filters.append(
            Q(Q(tas_rendering_label__icontains=filter_string) | Q(account_title__icontains=filter_string))
        )
    data = TreasuryAppropriationAccount.objects.annotate(
        has_faba=Exists(faba_with_file_D_data().filter(treasury_account=OuterRef("pk"))),
        agency=F("federal_account__parent_toptier_agency__toptier_code"),
        fed_account=F("federal_account__federal_account_code"),
    ).filter(*filters)
    retval = []
    for item in data:
        ancestor_array = [item.agency, item.fed_account]
        retval.append(
            {
                "id": item.tas_rendering_label,
                "ancestors": ancestor_array,
                "description": item.account_title,
                "count": 0,
                "children": None,
            }
        )
    return sorted(retval, key=lambda x: x["id"])