<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def games_played(self, app_ids):
 """ Set the apps being played by the user :param app_ids: a list of application ids :type app_ids: :class:`list` These app ids will be recorded in :attr:`current_games_played`. """

        if not isinstance(app_ids, list):
            raise ValueError("Expected app_ids to be of type list")

        self.current_games_played = app_ids = list(map(int, app_ids))

        self.send(MsgProto(EMsg.ClientGamesPlayed),
                  {'games_played': [{'game_id': app_id} for app_id in app_ids]}
                  )