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: Closes the writer of the observer.
  
  **Note**: Using the observer after it is closed (and not reopened) is not
    supported.
code: def close(self) -> None:
      """Closes the writer of the observer.
  
      **Note**: Using the observer after it is closed (and not reopened) is not
        supported.
      """
      if self._writer is not None:
          self._writer.end_episode()
          self._writer.close()
          self._writer = 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 12 for calling the ReverbAddTrajectoryObserver obj's underlying member method code with example usage: obj.close() without return types