class_docstr: Holds structured spaces records (i.e., raw actions and observations recorded during a rollout). 
docstr: Stack the whole trajectory into a single structured spaces record.
  
  Useful for processing whole fixed-length trajectories in a single batch.
docstr_tok: ["Stack","the","whole","trajectory","into","a","single","structured","spaces","record",".","Useful","for","processing","whole","fixed-length","trajectories","in","a","single","batch","."]
code: def stack(self) -> StructuredSpacesRecord:
      """Stack the whole trajectory into a single structured spaces record.
  
      Useful for processing whole fixed-length trajectories in a single batch.
      """
      return StructuredSpacesRecord.stack_records(self.step_records)
  
imports: from typing import List, Optional, Any, TypeVar, Generic, Dict, Union
  import numpy
  from maze.core.env.action_conversion import ActionType, TorchActionType
  from maze.core.rendering.renderer import Renderer
  from maze.core.trajectory_recording.records.state_record import StateRecord
  from maze.core.trajectory_recording.records.structured_spaces_record import StructuredSpacesRecord, StepKeyType
label_desc: Use image node_id 1 for calling the SpacesTrajectoryRecord obj's underlying member method code with example usage: obj.stack() and returns: StructuredSpacesRecord