class_docstr: A simple out-of-graph Replay Buffer.
  
  Stores transitions, state, action, reward, next_state, terminal (and any
  extra contents specified) in a circular buffer and provides a uniform
  transition sampling function.
  
  When the states consist of stacks of observations storing the states is
  inefficient. This class writes observations and constructs the stacked states
  at sample time.
  
  Attributes:
    add_count: int, counter of how many transitions have been added (including
      the blank ones at the beginning of an episode).
    invalid_range: np.array, an array with the indices of cursor-related invalid
      transitions
    episode_end_indices: set[int], a set of indices corresponding to the
      end of an episode.
docstr: Checks if args passed to the add method match those of the storage.
  
  Args:
    *args: Args whose types need to be validated.
  
  Raises:
    ValueError: If args have wrong shape or dtype.
docstr_tok: ["Checks","if","args","passed","to","the","add","method","match","those","of","the","storage",".","Args",":","*","args",":","Args","whose","types","need","to","be","validated",".","Raises",":","ValueError",":","If","args","have","wrong","shape","or","dtype","."]
code: def _check_add_types(self, *args):
      """Checks if args passed to the add method match those of the storage.
  
      Args:
        *args: Args whose types need to be validated.
  
      Raises:
        ValueError: If args have wrong shape or dtype.
      """
      self._check_args_length(*args)
      for arg_element, store_element in zip(
          args, self.get_add_args_signature()
      ):
          if isinstance(arg_element, np.ndarray):
              arg_shape = arg_element.shape
          elif isinstance(arg_element, tuple) or isinstance(
              arg_element, list
          ):
              # TODO(b/80536437). This is not efficient when arg_element is a list.
              arg_shape = np.array(arg_element).shape
          else:
              # Assume it is scalar.
              arg_shape = tuple()
          store_element_shape = tuple(store_element.shape)
          if arg_shape != store_element_shape:
              raise ValueError(
                  "arg has shape {}, expected {}".format(
                      arg_shape, store_element_shape
                  )
              )
  
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 11 for calling the OutOfGraphReplayBuffer obj's underlying member method code with example usage: obj._check_add_types() without return types