class_docstr: Wrapper of OutOfGraphReplayBuffer with an in graph sampling mechanism.
  
  Usage:
    To add a transition:  call the add function.
  
    To sample a batch:    Construct operations that depend on any of the
                          tensors is the transition dictionary. Every sess.run
                          that requires any of these tensors will sample a new
                          transition.
docstr: Adds a transition to the replay memory.
  
  Since the next_observation in the transition will be the observation added
  next there is no need to pass it.
  
  If the replay memory is at capacity the oldest transition will be discarded.
  
  Args:
    observation: np.array with shape observation_shape.
    action: int, the action in the transition.
    reward: float, the reward received in the transition.
    terminal: np.dtype, acts as a boolean indicating whether the transition
              was terminal (1) or not (0).
    *args: extra contents with shapes and dtypes according to
      extra_storage_types.
docstr_tok: ["Adds","a","transition","to","the","replay","memory",".","Since","the","next_observation","in","the","transition","will","be","the","observation","added","next","there","is","no","need","to","pass","it",".","If","the","replay","memory","is","at","capacity","the","oldest","transition","will","be","discarded",".","Args",":","observation",":","np.array","with","shape","observation_shape",".","action",":","int",",","the","action","in","the","transition",".","reward",":","float",",","the","reward","received","in","the","transition",".","terminal",":","np.dtype",",","acts","as","a","boolean","indicating","whether","the","transition","was","terminal","(","1",")","or","not","(","0",")",".","*","args",":","extra","contents","with","shapes","and","dtypes","according","to","extra_storage_types","."]
code: def add(self, observation, action, reward, terminal, *args):
      """Adds a transition to the replay memory.
  
      Since the next_observation in the transition will be the observation added
      next there is no need to pass it.
  
      If the replay memory is at capacity the oldest transition will be discarded.
  
      Args:
        observation: np.array with shape observation_shape.
        action: int, the action in the transition.
        reward: float, the reward received in the transition.
        terminal: np.dtype, acts as a boolean indicating whether the transition
                  was terminal (1) or not (0).
        *args: extra contents with shapes and dtypes according to
          extra_storage_types.
      """
      self.memory.add(observation, action, reward, terminal, *args)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import gzip
  import math
  import os
  import pickle
  from absl import logging
  import gin.tf
  import numpy
  import tensorflow
label_desc: Use image node_id 2 for calling the WrappedReplayBuffer obj's underlying member method code with example usage: obj.add(observation, action, reward, terminal) without return types