class_docstr: Base class for processing individual trajectories.
class_docstr_tok: ["Base","class","for","processing","individual","trajectories","."]
docstr: Preprocess a given trajectory before passing it through the wrapper stack.
  
  In order to deal with pre-processing methods that create multiple trajectories from a single one
  (e.g. data augmentation by permutation of subsets) a single trajectory can be returned as well as a list of
  multiple trajectories.
  
  :param trajectory: The trajectory to preprocess.
  :return: The pre-processed trajectory or a list of multiple pre-processed trajectories.
docstr_tok: ["Preprocess","a","given","trajectory","before","passing","it","through","the","wrapper","stack",".","In","order","to","deal","with","pre-processing","methods","that","create","multiple","trajectories","from","a","single","one","(","e.g",".","data","augmentation","by","permutation","of","subsets",")","a","single","trajectory","can","be","returned","as","well","as","a","list","of","multiple","trajectories",".",":","param","trajectory",":","The","trajectory","to","preprocess",".",":","return",":","The","pre-processed","trajectory","or","a","list","of","multiple","pre-processed","trajectories","."]
code: def pre_process(
      self, trajectory: TrajectoryRecord
  ) -> Union[TrajectoryRecord, List[TrajectoryRecord]]:
      """Preprocess a given trajectory before passing it through the wrapper stack.
  
      In order to deal with pre-processing methods that create multiple trajectories from a single one
      (e.g. data augmentation by permutation of subsets) a single trajectory can be returned as well as a list of
      multiple trajectories.
  
      :param trajectory: The trajectory to preprocess.
      :return: The pre-processed trajectory or a list of multiple pre-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 1 for calling the TrajectoryProcessor obj's underlying member method code with example usage: obj.pre_process(trajectory) without return types