code: def test_handles_multi_step_scenarios():
      env = build_dummy_structured_env()
      env = SpacesRecordingWrapper.wrap(env, output_dir="space_records")
  
      env.reset()
      for _ in range(6):
          action = env.action_space.sample()
          env.step(action)
  
      assert len(env.episode_record.step_records) == 3
      for step_record in env.episode_record.step_records:
          assert len(step_record.actions) == 2
          assert len(step_record.observations) == 2
  
file_path: maze/maze/test/core/wrappers/test_spaces_recording_wrapper.py
imports: import os
  import pickle
  import numpy
  from maze.core.trajectory_recording.datasets.in_memory_dataset import InMemoryDataset
  from maze.core.trajectory_recording.datasets.trajectory_processor import IdentityTrajectoryProcessor
  from maze.core.trajectory_recording.records.trajectory_record import SpacesTrajectoryRecord
  from maze.core.wrappers.spaces_recording_wrapper import SpacesRecordingWrapper
  from maze.test.shared_test_utils.helper_functions import build_dummy_maze_env, build_dummy_structured_env
label_desc: Use image node_id 3 for calling a global function with example usage: test_handles_multi_step_scenarios() without return types