code: def make_atari_env(
      env_id,
      num_env,
      seed,
      wrapper_kwargs=None,
      start_index=0,
      allow_early_resets=True,
      start_method=None,
      use_subprocess=False,
  ):
      """
      Create a wrapped, monitored VecEnv for Atari.
  
      :param env_id: (str) the environment ID
      :param num_env: (int) the number of environment you wish to have in subprocesses
      :param seed: (int) the initial seed for RNG
      :param wrapper_kwargs: (dict) the parameters for wrap_deepmind function
      :param start_index: (int) start rank index
      :param allow_early_resets: (bool) allows early reset of the environment
      :param start_method: (str) method used to start the subprocesses.
          See SubprocVecEnv doc for more information
      :param use_subprocess: (bool) Whether to use `SubprocVecEnv` or `DummyVecEnv` when
          `num_env` > 1, `DummyVecEnv` is usually faster. Default: False
      :return: (VecEnv) The atari environment
      """
      if wrapper_kwargs is None:
          wrapper_kwargs = {}
  
      def make_env(rank):
          def _thunk():
              env = make_atari(env_id)
              env.seed(seed + rank)
              env = Monitor(
                  env,
                  logger.get_dir()
                  and os.path.join(logger.get_dir(), str(rank)),
                  allow_early_resets=allow_early_resets,
              )
              return wrap_deepmind(env, **wrapper_kwargs)
  
          return _thunk
  
      set_global_seeds(seed)
  
      # When using one environment, no need to start subprocesses
      if num_env == 1 or not use_subprocess:
          return DummyVecEnv(
              [make_env(i + start_index) for i in range(num_env)]
          )
  
      return SubprocVecEnv(
          [make_env(i + start_index) for i in range(num_env)],
          start_method=start_method,
      )
  
file_path: stable-baselines/stable_baselines/common/cmd_util.py
imports: import os
  import warnings
  import gym
  from stable_baselines import logger
  from stable_baselines.bench import Monitor
  from stable_baselines.common.misc_util import set_global_seeds
  from stable_baselines.common.atari_wrappers import make_atari, wrap_deepmind
  from stable_baselines.common.misc_util import mpi_rank_or_zero
  from stable_baselines.common.vec_env import DummyVecEnv, SubprocVecEnv
label_desc: Use image node_id 2 for calling a global function with example usage: make_atari_env(env_id, num_env, seed, wrapper_kwargs, start_index, allow_early_resets, start_method, use_subprocess) and returns: SubprocVecEnv, _thunk, DummyVecEnv, wrap_deepmind