code: def player_action(game, player_sleep_time, actions, player_skip):
      if random_sleep:
          sleep(random() * 0.005 + 0.001)
      elif player_sleep_time > 0:
          sleep(player_sleep_time)
  
      game.make_action(choice(actions), player_skip)
  
      if game.is_player_dead():
          game.respawn_player()
  
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 2 for calling a global function with example usage: player_action(game, player_sleep_time, actions, player_skip) without return types