<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def reset(self):
 """Reset simulated and real environments."""

    self._frame_counter = 0
    ob_real = self.real_env.reset()
    # Initialize simulated environment with frames from real one.
    self.sim_env.add_to_initial_stack(ob_real)
    for _ in range(3):
      ob_real, _, _, _ = self.real_env.step(self.name_to_action_num["NOOP"])
      self.sim_env.add_to_initial_stack(ob_real)
    ob_sim = self.sim_env.reset()
    assert np.all(ob_real == ob_sim)
    self._last_step_tuples = self._pack_step_tuples((ob_real, 0, False, {}),
                                                    (ob_sim, 0, False, {}))
    self.set_zero_cumulative_rewards()
    ob, _, _, _ = self._player_step_tuple(self._last_step_tuples)
    return ob