code: def test_records_events_in_reset():
      env = build_dummy_maze_env()
      env = _EventsInResetWrapper.wrap(env)
      env = LogStatsWrapper.wrap(env)
  
      env.reset()
      for i in range(5):
          env.step(env.action_space.sample())
  
      env.write_epoch_stats()
      assert (
          env.get_stats_value(
              BaseEnvEvents.test_event, LogStatsLevel.EPOCH
          )
          == 1
      )
  
imports: import pytest
  from maze.core.env.base_env_events import BaseEnvEvents
  from maze.core.env.maze_env import MazeEnv
  from maze.core.env.observation_conversion import ObservationType
  from maze.core.log_events.monitoring_events import RewardEvents
  from maze.core.log_stats.log_stats import LogStatsLevel
  from maze.core.wrappers.log_stats_wrapper import LogStatsWrapper
  from maze.core.wrappers.wrapper import Wrapper
  from maze.test.shared_test_utils.dummy_wrappers.step_skip_in_reset_wrapper import StepSkipInResetWrapper
  from maze.test.shared_test_utils.dummy_wrappers.step_skip_in_step_wrapper import StepSkipInStepWrapper
  from maze.test.shared_test_utils.helper_functions import build_dummy_maze_env, build_dummy_structured_env
label_desc: Use image node_id 2 for calling a global function with example usage: test_records_events_in_reset() without return types