class_docstr: Base class for processing individual trajectories.
class_docstr_tok: ["Base","class","for","processing","individual","trajectories","."]
docstr: Convert an individual trajectory, by calling the pre_processing method followed by the
  convert_trajectory_with_env
  
  :param trajectory: Episode record to load.
  :param conversion_env: Env to use for conversion of MazeStates and MazeActions into observations and actions.
                         Required only if state records are being loaded (i.e. conversion to raw actions and
                         observations is needed).
  :return: A list (corresponding to the trajectories) of lists (corresponding to the steps of a individual
           trajectory) of Structured Spaces Records. Each Structures Spaces Record holds a single environment
           step with all corresponding information such as sub-step observations and actions as well as rewards
           and actor ids.
docstr_tok: ["Convert","an","individual","trajectory",",","by","calling","the","pre_processing","method","followed","by","the","convert_trajectory_with_env",":","param","trajectory",":","Episode","record","to","load",".",":","param","conversion_env",":","Env","to","use","for","conversion","of","MazeStates","and","MazeActions","into","observations","and","actions",".","Required","only","if","state","records","are","being","loaded","(","i.e",".","conversion","to","raw","actions","and","observations","is","needed",")",".",":","return",":","A","list","(","corresponding","to","the","trajectories",")","of","lists","(","corresponding","to","the","steps","of","a","individual","trajectory",")","of","Structured","Spaces","Records",".","Each","Structures","Spaces","Record","holds","a","single","environment","step","with","all","corresponding","information","such","as","sub-step","observations","and","actions","as","well","as","rewards","and","actor","ids","."]
code: def process(
      self,
      trajectory: TrajectoryRecord,
      conversion_env: Optional[MazeEnv],
  ) -> List[List[StructuredSpacesRecord]]:
      """Convert an individual trajectory, by calling the pre_processing method followed by the
      convert_trajectory_with_env
  
      :param trajectory: Episode record to load.
      :param conversion_env: Env to use for conversion of MazeStates and MazeActions into observations and actions.
                             Required only if state records are being loaded (i.e. conversion to raw actions and
                             observations is needed).
      :return: A list (corresponding to the trajectories) of lists (corresponding to the steps of a individual
               trajectory) of Structured Spaces Records. Each Structures Spaces Record holds a single environment
               step with all corresponding information such as sub-step observations and actions as well as rewards
               and actor ids.
      """
  
      pre_processed_trajectories = self.pre_process(trajectory)
      if not isinstance(pre_processed_trajectories, list):
          pre_processed_trajectories = [pre_processed_trajectories]
  
      env_processed_trajectories = [
          self.convert_trajectory_with_env(
              pre_processed_trajectory, conversion_env
          )
          for pre_processed_trajectory in pre_processed_trajectories
      ]
      return env_processed_trajectories
  
imports: import dataclasses
  from abc import abstractmethod
  from typing import List, Optional, Union, Dict, Tuple
  from maze.core.annotations import override
  from maze.core.env.maze_env import MazeEnv
  from maze.core.trajectory_recording.records.state_record import StateRecord
  from maze.core.trajectory_recording.records.structured_spaces_record import StructuredSpacesRecord
  from maze.core.trajectory_recording.records.trajectory_record import TrajectoryRecord
label_desc: Use image node_id 3 for calling the TrajectoryProcessor obj's underlying member method code with example usage: obj.process(trajectory, conversion_env) and returns: env_processed_trajectories