code: def replay_as_player2():
      game = DoomGame()
      game.load_config("../config/multi_duel.cfg")
      # At this moment ViZDoom will crash if there is no starting point - this is workaround for multiplayer map.
      game.add_game_args("-host 1 -deathmatch")
  
      game.init()
  
      # Replays episode recorded by player 1 from perspective of player2.
      game.replay_episode("multi_rec.lmp", 2)
  
      while not game.is_episode_finished():
          game.advance_action()
  
      print("Game finished!")
      print(
          "Player1 frags:",
          game.get_game_variable(vzd.GameVariable.PLAYER1_FRAGCOUNT),
      )
      print(
          "Player2 frags:",
          game.get_game_variable(vzd.GameVariable.PLAYER2_FRAGCOUNT),
      )
      game.close()
  
      # Delete multi_rec.lmp
      os.remove("multi_rec.lmp")
  
imports: from multiprocessing import Process
  from random import choice
  import vizdoom
  from vizdoom import DoomGame, os
label_desc: Use image node_id 3 for calling a global function with example usage: replay_as_player2() without return types