code: def __init__(self, env_name, env_seed=None, test=False, ob_rms=None):
      env = gym.make(env_name)
  
      # is instance of gym.spaces.Box
      if hasattr(env.action_space, "high"):
          from parl.env.mujoco_wrappers import wrap_rms
  
          self._max_episode_steps = env._max_episode_steps
          self.continuous_action = True
          if test:
              self.env = wrap_rms(env, GAMMA, test=True, ob_rms=ob_rms)
          else:
              self.env = wrap_rms(env, gamma=GAMMA)
      # is instance of gym.spaces.Discrete
      elif hasattr(env.action_space, "n"):
          from parl.env.atari_wrappers import wrap_deepmind
  
          self.continuous_action = False
          if test:
              self.env = wrap_deepmind(
                  env,
                  dim=ENV_DIM,
                  obs_format=OBS_FORMAT,
                  test=True,
                  test_episodes=1,
              )
          else:
              self.env = wrap_deepmind(
                  env, dim=ENV_DIM, obs_format=OBS_FORMAT
              )
      else:
          raise AssertionError(
              "act_space must be instance of gym.spaces.Box or gym.spaces.Discrete"
          )
  
      self.obs_space = self.env.observation_space
      self.act_space = self.env.action_space
  
      if env_seed:
          self.env.seed(env_seed)
  
file_path: PARL/benchmark/torch/ppo/env_utils.py
imports: import parl
  import gym
  import numpy
  from parl.utils import logger
label_desc: Use image node_id 1 to create a new LocalEnv object from inherited base classes: object with example: obj = LocalEnv(env_name, env_seed, test, ob_rms)