class_docstr: Records actions, observations, rewards and dones in structured spaces records.
  
  Dumps one trajectory record file per episode.
  
  :param output_dir: Where to dump the serialized trajectory data. Files for individual episodes
                     will be named after the episode ID, with ".pkl" suffix.
docstr: Keep both actions and observation the same - no change takes place in this wrapper.
docstr_tok: ["Keep","both","actions","and","observation","the","same","-","no","change","takes","place","in","this","wrapper","."]
code: def get_observation_and_action_dicts(
      self,
      maze_state: Optional[MazeStateType],
      maze_action: Optional[MazeActionType],
      first_step_in_episode: bool,
  ) -> Tuple[
      Optional[Dict[Union[int, str], Any]],
      Optional[Dict[Union[int, str], Any]],
  ]:
      """Keep both actions and observation the same - no change takes place in this wrapper."""
      return self.env.get_observation_and_action_dicts(
          maze_state, maze_action, first_step_in_episode
      )
  
imports: import pickle
  from pathlib import Path
  from typing import Union, Any, Tuple, Dict, Optional
  import gym
  from maze.core.annotations import override
  from maze.core.env.action_conversion import ActionType
  from maze.core.env.base_env import BaseEnv
  from maze.core.env.maze_action import MazeActionType
  from maze.core.env.maze_env import MazeEnv
  from maze.core.env.maze_state import MazeStateType
  from maze.core.env.observation_conversion import ObservationType
  from maze.core.trajectory_recording.records.spaces_record import SpacesRecord
  from maze.core.trajectory_recording.records.structured_spaces_record import StructuredSpacesRecord
  from maze.core.trajectory_recording.records.trajectory_record import SpacesTrajectoryRecord
  from maze.core.wrappers.wrapper import Wrapper
label_desc: Use image node_id 5 for calling the SpacesRecordingWrapper obj's underlying member method code with example usage: obj.get_observation_and_action_dicts(maze_state, maze_action, first_step_in_episode) and returns: self