text: import gym
  
  from touchstone.environments import SubprocVecEnv
  
  
  def set_global_seeds(seed):
      pass
  
  
  def make_env(env_id, rank, seed=0):
      """
      Utility function for multiprocessed env.
  
      :param env_id: (str) the environment ID
      :param num_env: (int) the number of environments you wish to have in subprocesses
      :param seed: (int) the inital seed for RNG
      :param rank: (int) index of the subprocess
      """
  
      def _init():
          env = gym.make(env_id)
          env.seed(seed + rank)
          return env
  
      set_global_seeds(seed)
      return _init
  
  
  if __name__ == '__main__':
  
      env_id = "CartPole-v1"
      num_cpu = 4  # Number of processes to use
      # Create the vectorized environment
      env = SubprocVecEnv([make_env(env_id, i) for i in range(num_cpu)])
  
      obs = env.reset()
      for _ in range(1000):
          action = env.action_space.sample()
          obs, rewards, dones, info = env.step([action])
          env.render()
  