def step(self, action):
total_reward = <NUM_LIT:0.0><EOL>done = None<EOL>for i in range(self._skip):<EOL><INDENT>obs, reward, done, info = self.env.step(action)<EOL>if i == self._skip - <NUM_LIT:2>: self._obs_buffer[<NUM_LIT:0>] = obs<EOL>if i == self._skip - <NUM_LIT:1>: self._obs_buffer[<NUM_LIT:1>] = obs<EOL>total_reward += reward<EOL>if done:<EOL><INDENT>break<EOL><DEDENT><DEDENT>max_frame = self._obs_buffer.max(axis=<NUM_LIT:0>)<EOL>return max_frame, total_reward, done, info<EOL>
Repeat action, sum reward, and max over last observations.