code: def wrap_rms(env, gamma, test=False, ob_rms=None):
      """Wrap original Mujoco environment with wrapper envs to provide normalization using rms and extra functionality,
      rewards information are stored in info['episode']. This is the wrapper for single agent.
      Args:
          env (gym.Wrapper): Mujoco env
          gamma (float or None): discounting factor, if test then gamma = None
          test (bool): True if test else False
          ob_rms (None or np.array): ob_rms from training environment, not None only when test is True
      """
      env = CompatWrapper(env)
      env = TimeLimitMaskEnv(env)
      env = MonitorEnv(env)
  
      if test:
          env = VecNormalizeEnv(env, ret=False)
          env.eval()
          env.set_ob_rms(ob_rms)
      else:
          env = VecNormalizeEnv(env, gamma=gamma)
  
      return env
  
imports: import numpy
  import gym
  import time
  from parl.env.compat_wrappers import CompatWrapper
label_desc: Use image node_id 4 for calling a global function with example usage: wrap_rms(env, gamma, test, ob_rms) and returns: env