def get_summoner_by_id(id_):
    """
    Gets a summoner by ID

    Args:
        id_ (int): the ID of the summoner

    Returns:
        Summoner: the summoner
    """
    summoner = cassiopeia.core.requests.data_store.get(cassiopeia.type.core.summoner.Summoner, id_, "id")
    if summoner:
        return summoner

    try:
        summoner = cassiopeia.dto.summonerapi.get_summoners_by_id(id_)[str(id_)]
        summoner = cassiopeia.type.core.summoner.Summoner(summoner)
    except __HOLE__:
        return None

    cassiopeia.core.requests.data_store.store(summoner, id_)
    cassiopeia.core.requests.data_store.store(summoner, summoner.name)
    return summoner
dataset/ETHPy150Open meraki-analytics/cassiopeia/cassiopeia/core/summonerapi.py/get_summoner_by_id