class_docstr: Accumulator for gathering the latest timesteps into sequences.
  
  Note sequences can overlap and cross episode boundaries.
class_docstr_tok: ["Accumulator","for","gathering","the","latest","timesteps","into","sequences",".","Note","sequences","can","overlap","and","cross","episode","boundaries","."]
code: def push(self, timestep, action):
      # Replace `None`s with zeros as these will be put into NumPy arrays.
      a_tm1 = 0 if action is None else action
      timestep_t = timestep._replace(
          step_type=int(timestep.step_type),
          reward=0.0 if timestep.reward is None else timestep.reward,
          discount=0.0
          if timestep.discount is None
          else timestep.discount,
      )
      self._timesteps.append((a_tm1, timestep_t))
  
imports: import collections
  from absl import app
  from absl import flags
  from bsuite.environments import catch
  import dm_env
  import haiku
  from haiku import nets
  import jax
  import jax.numpy
  import numpy
  import optax
  import rlax
  from rlax.examples import experiment
label_desc: Use image node_id 2 for calling the SequenceAccumulator obj's underlying member method code with example usage: obj.push(timestep, action) without return types