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","."]
docstr: Returns current sequence of accumulated timesteps.
docstr_tok: ["Returns","current","sequence","of","accumulated","timesteps","."]
code: def sample(self, batch_size):
      """Returns current sequence of accumulated timesteps."""
      if batch_size != 1:
          raise ValueError("Require batch_size == 1.")
      if len(self._timesteps) != self._timesteps.maxlen:
          raise ValueError("Not enough timesteps for a full sequence.")
  
      actions, timesteps = jax.tree_map(
          lambda *ts: np.stack(ts), *self._timesteps
      )
      return actions, timesteps
  
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 3 for calling the SequenceAccumulator obj's underlying member method code with example usage: obj.sample(batch_size) and returns: actions,  timesteps