def METHOD_NAME(cfdas):
    total_amount_agency = defaultdict(lambda: 0)
    total_da_amount_agency = defaultdict(lambda: 0)
    total_da_amount_expended = 0
    for cfda in cfdas:
        agency = cfda[1][:2]
        amount = cfda[2] or 0
        direct = cfda[3]
        # TODO use amount rather than programamount?
        # programtotal = cfda[4] or 0
        total_amount_agency[agency] += amount
        if direct == "Y":
            total_da_amount_expended += amount
            total_da_amount_agency[agency] += amount
    max_total_agency, max_da_agency = _extract_max_agency(
        total_amount_agency, total_da_amount_agency
    )
    return total_da_amount_expended, max_total_agency, max_da_agency