def METHOD_NAME(self, federal_accounts, treasury_account_keyword):
    latest = (
        SubmissionAttributes.objects.filter(
            submission_window__submission_reveal_date__lte=now(), reporting_fiscal_year=self.fiscal_year
        )
        .values("reporting_fiscal_year")
        .annotate(max_fiscal_period=Max(F("reporting_fiscal_period")))
        .values("max_fiscal_period")
    )
    filters = [
        Q(
            **{
                f"{treasury_account_keyword}__federal_account__parent_toptier_agency_id": self.toptier_agency.toptier_agency_id
            }
        ),
        Q(**{f"{treasury_account_keyword}__federal_account__federal_account_code__in": federal_accounts}),
        Q(submission__reporting_fiscal_year=self.fiscal_year),
        Q(submission__reporting_fiscal_period=latest[0]["max_fiscal_period"]),
    ]
    annotations = {
        "name": F(f"{treasury_account_keyword}__federal_account__account_title"),
        "account_code": F(f"{treasury_account_keyword}__federal_account__federal_account_code"),
    }
    return filters, annotations