<s> import cassiopeia . dto . gameapi <EOL> import cassiopeia . core . requests <EOL> import cassiopeia . type . core . game <EOL> def get_recent_games ( summoner ) : <EOL> """<STR_LIT>""" <EOL> games = cassiopeia . dto . gameapi . get_recent_games ( summoner . id ) <EOL> if cassiopeia . core . requests . load_policy is cassiopeia . type . core . common . LoadPolicy . eager : <EOL> summoner_ids = games . summoner_ids <EOL> cassiopeia . riotapi . get_summoners_by_id ( list ( summoner_ids ) ) if summoner_ids else None <EOL> cassiopeia . riotapi . get_summoner_spells ( ) if games . summoner_spell_ids else None <EOL> return [ cassiopeia . type . core . game . Game ( game , games . summonerId ) for game in games . games ] </s>
