class_docstr: This wrapper will normalize immediate rewards s.t. their exponential moving average has a fixed variance.
  
  The exponential moving average will have variance :math:`(1 - \gamma)^2`.
  
  Note:
      The scaling depends on past trajectories and rewards will not be scaled correctly if the wrapper was newly
      instantiated or the policy was changed recently.
class_docstr_tok: ["This","wrapper","will","normalize","immediate","rewards","s.t",".","their","exponential","moving","average","has","a","fixed","variance",".","The","exponential","moving","average","will","have","variance",":","math",":","`","(","1","-","\\gamma",")","^2","`",".","Note",":","The","scaling","depends","on","past","trajectories","and","rewards","will","not","be","scaled","correctly","if","the","wrapper","was","newly","instantiated","or","the","policy","was","changed","recently","."]
docstr: Steps through the environment, normalizing the rewards returned.
docstr_tok: ["Steps","through","the","environment",",","normalizing","the","rewards","returned","."]
code: def step(self, action):
      """Steps through the environment, normalizing the rewards returned."""
      obs, rews, terminateds, truncateds, infos = self.env.step(action)
      if not self.is_vector_env:
          rews = np.array([rews])
      self.returns = self.returns * self.gamma + rews
      rews = self.normalize(rews)
      dones = np.logical_or(terminateds, truncateds)
      self.returns[dones] = 0.0
      if not self.is_vector_env:
          rews = rews[0]
      return obs, rews, terminateds, truncateds, infos
  
file_path: gym/gym/wrappers/normalize.py
imports: import numpy
  import gym
label_desc: Use image node_id 2 for calling the NormalizeReward obj's underlying member method code with example usage: obj.step(action) and returns: obs,  rews,  terminateds,  truncateds,  infos