class_docstr: Stateful observer for writing fixed length trajectories to Reverb.
  
  This observer should be called at every environment step. It does not support
  batched trajectories.
  
  Steps are cached until `sequence_length` steps are gathered. At which point an
  item is created. From there on a new item is created every `stride_length`
  observer calls.
  
  If an episode terminates before enough steps are cached, the data is discarded
  unless `pad_end_of_episodes` is set.
docstr: Writes the cached steps iff there is enough data in the cache.
  
  **Note**: The method does *not* clear the cache after writing.
code: def _write_cached_steps(self) -> None:
      """Writes the cached steps iff there is enough data in the cache.
  
      **Note**: The method does *not* clear the cache after writing.
      """
  
      if self._sequence_lengths_reached():
          trajectory = tf.nest.map_structure(
              lambda d: d[-self._sequence_length :],
              self._get_writer().history,
          )
          for table_name in self._table_names:
              self._get_writer().create_item(
                  table=table_name,
                  trajectory=trajectory,
                  priority=self._priority,
              )
  
      return None
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Sequence, Text, Union
  from absl import logging
  import tensorflow
  from tf_agents.trajectories import trajectory
  from tf_agents.typing import types
  from tf_agents.utils import lazy_loader
label_desc: Use image node_id 7 for calling the ReverbAddTrajectoryObserver obj's underlying member method code with example usage: obj._write_cached_steps() and returns: None