def METHOD_NAME(self, agency_identifier, row):
    frec_inst = FrecMap.objects.filter(
        agency_identifier=agency_identifier,
        main_account_code=row["Account Code"],
        sub_function_code=row["Subfunction Code"],
    )
    if frec_inst.exists():
        return frec_inst.first().fr_entity_code