def get_top_champion_masteries(summoner_id, count=3):
    region = cassiopeia.type.core.common.Region(cassiopeia.dto.requests.region)
    platform = cassiopeia.type.core.common.Platform[region.name]

    # Get JSON response
    request = "https://{server}.api.pvp.net/championmastery/location/{platform}/player/{summonerId}/topchampions".format(server=cassiopeia.dto.requests.region, platform=platform.value, summonerId=summoner_id)
    response = cassiopeia.dto.requests.get(request, {"count": count}, include_base=False)

    # Convert response to Dto type
    return [cassiopeia.type.dto.championmastery.ChampionMastery(cm) for cm in response]
https://developer.riotgames.com/api/methods#!/1034/3540
dataset/ETHPy150Open meraki-analytics/cassiopeia/cassiopeia/dto/championmasteryapi.py/get_top_champion_masteries