class_docstr: A moving average, normalizing wrapper for vectorized environment.
  
  It is pickleable which will save moving averages and configuration parameters.
  The wrapped environment `venv` is not saved, and must be restored manually with
  `set_venv` after being unpickled.
  
  :param venv: (VecEnv) the vectorized environment to wrap
  :param training: (bool) Whether to update or not the moving average
  :param norm_obs: (bool) Whether to normalize observation or not (default: True)
  :param norm_reward: (bool) Whether to normalize rewards or not (default: True)
  :param clip_obs: (float) Max absolute value for observation
  :param clip_reward: (float) Max value absolute for discounted reward
  :param gamma: (float) discount factor
  :param epsilon: (float) To avoid division by zero
class_docstr_tok: ["A","moving","average",",","normalizing","wrapper","for","vectorized","environment",".","It","is","pickleable","which","will","save","moving","averages","and","configuration","parameters",".","The","wrapped","environment","`","venv","`","is","not","saved",",","and","must","be","restored","manually","with","`","set_venv","`","after","being","unpickled",".",":","param","venv",":","(","VecEnv",")","the","vectorized","environment","to","wrap",":","param","training",":","(","bool",")","Whether","to","update","or","not","the","moving","average",":","param","norm_obs",":","(","bool",")","Whether","to","normalize","observation","or","not","(","default",":","True",")",":","param","norm_reward",":","(","bool",")","Whether","to","normalize","rewards","or","not","(","default",":","True",")",":","param","clip_obs",":","(","float",")","Max","absolute","value","for","observation",":","param","clip_reward",":","(","float",")","Max","value","absolute","for","discounted","reward",":","param","gamma",":","(","float",")","discount","factor",":","param","epsilon",":","(","float",")","To","avoid","division","by","zero"]
docstr: Normalize rewards using this VecNormalize's rewards statistics.
  Calling this method does not update statistics.
docstr_tok: ["Normalize","rewards","using","this","VecNormalize","'s","rewards","statistics",".","Calling","this","method","does","not","update","statistics","."]
code: def normalize_reward(self, reward: np.ndarray) -> np.ndarray:
      """
      Normalize rewards using this VecNormalize's rewards statistics.
      Calling this method does not update statistics.
      """
      if self.norm_reward:
          reward = np.clip(
              reward / np.sqrt(self.ret_rms.var + self.epsilon),
              -self.clip_reward,
              self.clip_reward,
          )
      return reward
  
imports: import pickle
  import warnings
  import numpy
  from stable_baselines.common.vec_env.base_vec_env import VecEnvWrapper
  from stable_baselines.common.running_mean_std import RunningMeanStd
label_desc: Use image node_id 8 for calling the VecNormalize obj's underlying member method code with example usage: obj.normalize_reward(reward) and returns: reward