class_docstr: Atari 2600 preprocessing wrapper.
  
  This class follows the guidelines in Machado et al. (2018),
  "Revisiting the Arcade Learning Environment: Evaluation Protocols and Open Problems for General Agents".
  
  Specifically, the following preprocess stages applies to the atari environment:
  - Noop Reset: Obtains the initial state by taking a random number of no-ops on reset, default max 30 no-ops.
  - Frame skipping: The number of frames skipped between steps, 4 by default
  - Max-pooling: Pools over the most recent two observations from the frame skips
  - Termination signal when a life is lost: When the agent losses a life during the environment, then the environment is terminated.
      Turned off by default. Not recommended by Machado et al. (2018).
  - Resize to a square image: Resizes the atari environment original observation shape from 210x180 to 84x84 by default
  - Grayscale observation: If the observation is colour or greyscale, by default, greyscale.
  - Scale observation: If to scale the observation between [0, 1) or [0, 255), by default, not scaled.
docstr: Applies the preprocessing for an :meth:`env.step`.
docstr_tok: ["Applies","the","preprocessing","for","an",":","meth",":","`","env.step","`","."]
code: def step(self, action):
      """Applies the preprocessing for an :meth:`env.step`."""
      total_reward, terminated, truncated, info = 0.0, False, False, {}
  
      for t in range(self.frame_skip):
          _, reward, terminated, truncated, info = self.env.step(action)
          total_reward += reward
          self.game_over = terminated
  
          if self.terminal_on_life_loss:
              new_lives = self.ale.lives()
              terminated = terminated or new_lives < self.lives
              self.game_over = terminated
              self.lives = new_lives
  
          if terminated or truncated:
              break
          if t == self.frame_skip - 2:
              if self.grayscale_obs:
                  self.ale.getScreenGrayscale(self.obs_buffer[1])
              else:
                  self.ale.getScreenRGB(self.obs_buffer[1])
          elif t == self.frame_skip - 1:
              if self.grayscale_obs:
                  self.ale.getScreenGrayscale(self.obs_buffer[0])
              else:
                  self.ale.getScreenRGB(self.obs_buffer[0])
      return self._get_obs(), total_reward, terminated, truncated, info
  
file_path: gym/gym/wrappers/atari_preprocessing.py
imports: import numpy
  import gym
  from gym.spaces import Box
label_desc: Use image node_id 3 for calling the AtariPreprocessing obj's underlying member method code with example usage: obj.step(action) and returns: self,  total_reward,  terminated,  truncated,  info