code: def player_host(p):
      game, actions = setup_player()
  
      # Setup multiplayer deathmatch game for {p} players that will time out after {timelimit} minutes
      game.add_game_args(
          f"-host {p} -netmode 0 -deathmatch +timelimit {timelimit} +sv_spawnfarthest 1"
      )
      # Use additional arguments to set player name, color and window position
      game.add_game_args(
          f"+name Player0 +colorset 0 +win_x {win_x} +win_y {win_y}"
      )
      # Add additional arguments
      game.add_game_args(args)
  
      game.init()
  
      action_count = 0
      player_sleep_time = const_sleep_time
      player_skip = skip
  
      for i in range(episodes):
          print(f"Episode #{i + 1}")
          episode_start_time = None
  
          while not game.is_episode_finished():
              if episode_start_time is None:
                  episode_start_time = time()
  
              state = game.get_state()
              print(
                  "Player0:",
                  state.number,
                  action_count,
                  game.get_episode_time(),
              )
  
              player_action(
                  game, player_sleep_time, actions, player_skip
              )
              action_count += 1
  
          print(
              "Player0 frags:",
              game.get_game_variable(vzd.GameVariable.FRAGCOUNT),
          )
  
          print("Host: Episode finished!")
          player_count = int(
              game.get_game_variable(vzd.GameVariable.PLAYER_COUNT)
          )
          for i in range(1, player_count + 1):
              print(
                  f"Host: Player{i}:",
                  game.get_game_variable(
                      eval(f"vzd.GameVariable.PLAYER{i}_FRAGCOUNT")
                  ),
              )
          print(
              "Host: Episode processing time:",
              time() - episode_start_time,
          )
  
          # Starts a new episode. All players have to call new_episode() in multiplayer mode.
          game.new_episode()
  
      game.close()
  
file_path: ViZDoom/examples/python/multiple_instances_advance.py
imports: import os
  from multiprocessing import Process, cpu_count
  from random import choice, random
  from time import sleep, time
  import vizdoom
label_desc: Use image node_id 3 for calling a global function with example usage: player_host(p) without return types