code: def make_vec_env(env_id, env_type, num_env, seed,
                   wrapper_kwargs=None,
                   start_index=0,
                   reward_scale=1.0,
                   flatten_dict_observations=True,
                   gamestate=None):
      
      wrapper_kwargs = wrapper_kwargs or {}
      mpi_rank = MPI.COMM_WORLD.Get_rank() if MPI else 0
      seed = seed + 10000 * mpi_rank if seed is not None else None
      logger_dir = logger.get_dir()
      def make_thunk(rank):
          return lambda: make_env(
              env_id=env_id,
              env_type=env_type,
              mpi_rank=mpi_rank,
              subrank=rank,
              seed=seed,
              reward_scale=reward_scale,
              gamestate=gamestate,
              flatten_dict_observations=flatten_dict_observations,
              wrapper_kwargs=wrapper_kwargs,
              logger_dir=logger_dir
          )
  
      set_global_seeds(seed)
      if num_env > 1:
          return SubprocVecEnv([make_thunk(i + start_index) for i in range(num_env)])
      else:
          return DummyVecEnv([make_thunk(start_index)])
docs: Create a wrapped, monitored SubprocVecEnv for Atari and MuJoCo.