def decode_action(action_id) -> 'ActionEvent':
        ''' Action id -> the action_event in the game.

        Args:
            action_id (int): the id of the action

        Returns:
            action (ActionEvent): the action that will be passed to the game engine.
        '''
        if action_id == score_player_0_action_id:
            action_event = ScoreNorthPlayerAction()
        elif action_id == score_player_1_action_id:
            action_event = ScoreSouthPlayerAction()
        elif action_id == draw_card_action_id:
            action_event = DrawCardAction()
        elif action_id == pick_up_discard_action_id:
            action_event = PickUpDiscardAction()
        elif action_id == declare_dead_hand_action_id:
            action_event = DeclareDeadHandAction()
        elif action_id == gin_action_id:
            action_event = GinAction()
        elif action_id in range(discard_action_id, discard_action_id + 52):
            card_id = action_id - discard_action_id
            card = utils.get_card(card_id=card_id)
            action_event = DiscardAction(card=card)
        elif action_id in range(knock_action_id, knock_action_id + 52):
            card_id = action_id - knock_action_id
            card = utils.get_card(card_id=card_id)
            action_event = KnockAction(card=card)
        else:
            raise Exception("decode_action: unknown action_id={}".format(action_id))
        return action_event
 Action id -> the action_event in the game.

        Args:
            action_id (int): the id of the action

        Returns:
            action (ActionEvent): the action that will be passed to the game engine.
        
rlcard/games/gin_rummy/utils/action_event.py