class_docstr: A Python-based replay buffer with optimized underlying storage.
  
  This replay buffer deduplicates data in the stored trajectories along the
  last axis of the observation, which is useful, e.g., if you are performing
  something like frame stacking. For example, if each observation is 4 stacked
  84x84 grayscale images forming a shape [84, 84, 4], then the replay buffer
  will separate out each of the images and depuplicate across each trajectory
  in case an image is repeated.
  
  Note: This replay buffer assumes that the items being stored are
  trajectory.Trajectory instances.
class_docstr_tok: ["A","Python-based","replay","buffer","with","optimized","underlying","storage",".","This","replay","buffer","deduplicates","data","in","the","stored","trajectories","along","the","last","axis","of","the","observation",",","which","is","useful",",","e.g.",",","if","you","are","performing","something","like","frame","stacking",".","For","example",",","if","each","observation","is","4","stacked","84x84","grayscale","images","forming","a","shape","[","84",",","84",",","4","]",",","then","the","replay","buffer","will","separate","out","each","of","the","images","and","depuplicate","across","each","trajectory","in","case","an","image","is","repeated",".","Note",":","This","replay","buffer","assumes","that","the","items","being","stored","are","trajectory.Trajectory","instances","."]
code: def _encoded_data_spec(self):
      observation = self._data_spec.observation
      observation = array_spec.ArraySpec(
          shape=(observation.shape[-1],), dtype=np.int64
      )
      return self._data_spec._replace(observation=observation)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import pickle
  import threading
  from absl import logging
  import numpy
  import tensorflow
  from tf_agents.replay_buffers import py_uniform_replay_buffer
  from tf_agents.specs import array_spec
  from tf_agents.trajectories import trajectory
label_desc: Use image node_id 2 for calling the PyHashedReplayBuffer obj's underlying member method code with example usage: obj._encoded_data_spec() and returns: self