class_docstr: A Python-based replay buffer that supports uniform sampling.
  
  Writing and reading to this replay buffer is thread safe.
  
  This replay buffer can be subclassed to change the encoding used for the
  underlying storage by overriding _encoded_data_spec, _encode, _decode, and
  _on_delete.
class_docstr_tok: ["A","Python-based","replay","buffer","that","supports","uniform","sampling",".","Writing","and","reading","to","this","replay","buffer","is","thread","safe",".","This","replay","buffer","can","be","subclassed","to","change","the","encoding","used","for","the","underlying","storage","by","overriding","_encoded_data_spec",",","_encode",",","_decode",",","and","_on_delete","."]
docstr: Encodes an item (before adding it to the buffer).
docstr_tok: ["Encodes","an","item","(","before","adding","it","to","the","buffer",")","."]
code: def _encode(self, item):
      """Encodes an item (before adding it to the buffer)."""
      return item
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import threading
  import numpy
  import tensorflow
  from tf_agents.replay_buffers import replay_buffer
  from tf_agents.specs import array_spec
  from tf_agents.utils import nest_utils
  from tf_agents.utils import numpy_storage
label_desc: Use image node_id 3 for calling the PyUniformReplayBuffer obj's underlying member method code with example usage: obj._encode(item) and returns: item