def METHOD_NAME(_root, _info: ResolveInfo, **kwargs):
    country_rates = models.TaxClassCountryRate.objects.all()
    rates_per_country = defaultdict(list)
    for country_rate in country_rates:
        rates_per_country[country_rate.country].append(country_rate)
    return [
        TaxCountryConfiguration(
            country=country, tax_class_country_rates=rates_per_country[country]
        )
        for country in rates_per_country
    ]