class_docstr: Max and skip wrapper for gym.Env.
  
  It returns only every `skip`-th frame. Action are repeated and rewards are
  sum for the skipped frames.
  
  It also takes element-wise maximum over the last two consecutive frames,
  which helps algorithm deal with the problem of how certain Atari games only
  render their sprites every other game frame.
  
  Args:
      env (gym.Env): The environment to be wrapped.
      skip (int): The environment only returns `skip`-th frame.
class_docstr_tok: ["Max","and","skip","wrapper","for","gym.Env",".","It","returns","only","every","`","skip","`","-th","frame",".","Action","are","repeated","and","rewards","are","sum","for","the","skipped","frames",".","It","also","takes","element-wise","maximum","over","the","last","two","consecutive","frames",",","which","helps","algorithm","deal","with","the","problem","of","how","certain","Atari","games","only","render","their","sprites","every","other","game","frame",".","Args",":","env","(","gym.Env",")",":","The","environment","to","be","wrapped",".","skip","(","int",")",":","The","environment","only","returns","`","skip","`","-th","frame","."]
code: def __init__(self, env, skip=4):
      super().__init__(env)
      self._obs_buffer = np.zeros(
          (2,) + env.observation_space.shape, dtype=np.uint8
      )
      self._skip = skip
  
imports: import gym
  import numpy
label_desc: Use image node_id 1 to create a new MaxAndSkip object from inherited base classes: gym with example: obj = MaxAndSkip(env, skip)