def METHOD_NAME():
    engine = sqlalchemy.create_engine(
        os.getenv("DATABASE_URL").replace("postgres", "postgresql", 1)
    )
    AUDIT_QUERY = """
        SELECT gen."DBKEY", gen."EIN", cast(gen."TOTFEDEXPEND" as BIGINT),
                cfda."CFDA", cast(cfda."AMOUNT" as BIGINT), cfda."DIRECT", cast(cfda."PROGRAMTOTAL" as BIGINT)
        FROM census_gen19 gen, census_cfda19 cfda
        WHERE gen."AUDITYEAR" = :ref_year
        AND cast(gen."TOTFEDEXPEND" as BIGINT) >= :threshold
        AND gen."DBKEY" = cfda."DBKEY"
        ORDER BY gen."DBKEY"
    """
    with engine.connect() as conn:
        result = conn.execute(
            sqlalchemy.text(AUDIT_QUERY), {"ref_year": REF_YEAR, "threshold": COG_LIMIT}
        )
        gens = []
        cfdas = []
        for row in result:
            (DBKEY, EIN, TOTFEDEXPEND, CFDA, AMOUNT, DIRECT, PROGRAMTOTAL) = row
            if (DBKEY, EIN, TOTFEDEXPEND) not in gens:
                gens.append((DBKEY, EIN, TOTFEDEXPEND))
            cfdas.append((DBKEY, CFDA, AMOUNT, DIRECT, PROGRAMTOTAL))
    CognizantBaseline.objects.all().delete()
    for gen in gens:
        dbkey = gen[0]
        ein = gen[1]
        total_amount_expended = gen[2]
        (total_da_amount_expended, max_total_agency, max_da_agency) = calc_cfda_amounts(
            cfdas=[cfda for cfda in cfdas if cfda[0] == dbkey]
        )
        cognizant_agency = determine_agency(
            total_amount_expended,
            total_da_amount_expended,
            max_total_agency,
            max_da_agency,
        )
        if cognizant_agency:
            CognizantBaseline(
                dbkey=dbkey, audit_year=2019, ein=ein, cognizant_agency=cognizant_agency
            ).save()
    return CognizantBaseline.objects.count()