def get_stats(summoner, season=None):
    if season and season not in cassiopeia.type.core.common.stats_seasons:
        raise ValueError("Must use a valid season to get stats for")

    stats = cassiopeia.dto.statsapi.get_stats(summoner.id, season.value if season else None)
    return {cassiopeia.type.core.common.StatSummaryType(summary.playerStatSummaryType): cassiopeia.type.core.stats.StatsSummary(summary) for summary in stats.playerStatSummaries}
Runs when trigger is updated
dataset/ETHPy150Open meraki-analytics/cassiopeia/cassiopeia/core/statsapi.py/get_stats--crossover with--dataset/ETHPy150Open StackStorm/st2contrib/packs/trello/sensors/list_actions_sensor.py/TrelloListSensor.update_trigger