'Return IDs of regions for which this app is excluded.
This will be all the addon excluded regions. If the app is premium,
this will also exclude any region that does not have the price tier
set.
Note: free and in-app are not included in this.'

def get_excluded_region_ids(self):

    excluded = set(self.addonexcludedregion.values_list('region', flat=True))
    if self.is_premium():
        all_regions = set(mkt.regions.ALL_REGION_IDS)
        price_ids = self.get_price_region_ids()
        if ((RESTOFWORLD.id in excluded) or (RESTOFWORLD.id not in price_ids)):
            excluded = excluded.union(all_regions.difference(price_ids))
    geo = self.geodata
    if (geo.region_de_iarc_exclude or geo.region_de_usk_exclude):
        excluded.add(mkt.regions.DEU.id)
    if geo.region_br_iarc_exclude:
        excluded.add(mkt.regions.BRA.id)
    return sorted(list(excluded))
