async def query_listing(region: 'Region', type: Literal[('sales', 'new', 'ranking')]) -> Generator[(Game, None, None)]:
    if (not region.supports_listing):
        raise UnsupportedRegionError('Region does not support listings')
    if (type not in ['sales', 'new', 'ranking']):
        raise ValueError(('Invalid type: ' + type))
    (lang, reg) = region.culture_code.split('_')
    offset = 0
    async with aiohttp.ClientSession() as session:
        while True:
            url = f'https://ec.nintendo.com/api/{reg}/{lang}/search/{type}?offset={offset}&count={COUNT}'
            async with session.get(url) as request:
                request.raise_for_status()
                data = (await request.json())
                for game in data['contents']:
                    (yield Game(game, region))
                if ((offset + COUNT) >= data['total']):
                    break
            offset += COUNT
async def query_listing(region: 'Region', type: Literal[('sales', 'new', 'ranking')]) -> Generator[(Game, None, None)]:
    if (not region.supports_listing):
        raise UnsupportedRegionError('Region does not support listings')
    if (type not in ['sales', 'new', 'ranking']):
        raise ValueError(('Invalid type: ' + type))
    (lang, reg) = region.culture_code.split('_')
    offset = 0
    async with aiohttp.ClientSession() as session:
        while True:
            url = f'https://ec.nintendo.com/api/{reg}/{lang}/search/{type}?offset={offset}&count={COUNT}'
            async with session.get(url) as request:
                request.raise_for_status()
                data = (await request.json())
                for game in data['contents']:
                    (yield Game(game, region))
                if ((offset + COUNT) >= data['total']):
                    break
            offset += COUNT