class_docstr: Replay buffer for off policy learning.
  
  :param buffer_size: The maximum buffer size.
  :param seed: The random seed used for initializing the uniform random sampling in the buffer.
class_docstr_tok: ["Replay","buffer","for","off","policy","learning",".",":","param","buffer_size",":","The","maximum","buffer","size",".",":","param","seed",":","The","random","seed","used","for","initializing","the","uniform","random","sampling","in","the","buffer","."]
docstr: implementation of :class:`~maze.train.trainers.common.replay_buffer.replay_buffer.BaseReplayBuffer`
          
docstr_tok: ["implementation","of",":","class",":","`","~maze.train.trainers.common.replay_buffer.replay_buffer.BaseReplayBuffer","`"]
code: def add_transition(
      self,
      transition: Union[StructuredSpacesRecord, SpacesTrajectoryRecord],
  ) -> None:
      """implementation of :class:`~maze.train.trainers.common.replay_buffer.replay_buffer.BaseReplayBuffer`"""
      self._buffer[self._buffer_idx] = transition
      self._fill_state = max(self._buffer_idx + 1, self._fill_state)
      self._buffer_idx = (self._buffer_idx + 1) % self._buffer_size
      self._total_number_of_transitions += 1
  
file_path: maze/maze/train/trainers/common/replay_buffer/uniform_replay_buffer.py
imports: from typing import Union, List
  import numpy
  from maze.core.annotations import override
  from maze.core.trajectory_recording.records.structured_spaces_record import StructuredSpacesRecord
  from maze.core.trajectory_recording.records.trajectory_record import SpacesTrajectoryRecord
  from maze.train.trainers.common.replay_buffer.replay_buffer import BaseReplayBuffer
label_desc: Use image node_id 2 for calling the UniformReplayBuffer obj's underlying member method code with example usage: obj.add_transition(transition) without return types