class_docstr: A TFUniformReplayBuffer with batched adds and uniform sampling.
class_docstr_tok: ["A","TFUniformReplayBuffer","with","batched","adds","and","uniform","sampling","."]
docstr: Creates a dataset that returns entries from the buffer in shuffled order.
  
  Args:
    sample_batch_size: (Optional.) An optional batch_size to specify the
      number of items to return. See as_dataset() documentation.
    num_steps: (Optional.)  Optional way to specify that sub-episodes are
      desired. See as_dataset() documentation.
    sequence_preprocess_fn: (Optional.) Preprocessing function for sequences
      before they are sharded into subsequences of length `num_steps` and
      batched.
    num_parallel_calls: (Optional.) Number elements to process in parallel.
      See as_dataset() documentation.
  
  Returns:
    A dataset of type tf.data.Dataset, elements of which are 2-tuples of:
  
      - An item or sequence of items or batch thereof
      - Auxiliary info for the items (i.e. ids, probs).
  
  Raises:
    NotImplementedError: If `sequence_preprocess_fn != None` is passed in.
docstr_tok: ["Creates","a","dataset","that","returns","entries","from","the","buffer","in","shuffled","order",".","Args",":","sample_batch_size",":","(","Optional",".",")","An","optional","batch_size","to","specify","the","number","of","items","to","return",".","See","as_dataset","(",")","documentation",".","num_steps",":","(","Optional",".",")","Optional","way","to","specify","that","sub-episodes","are","desired",".","See","as_dataset","(",")","documentation",".","sequence_preprocess_fn",":","(","Optional",".",")","Preprocessing","function","for","sequences","before","they","are","sharded","into","subsequences","of","length","`","num_steps","`","and","batched",".","num_parallel_calls",":","(","Optional",".",")","Number","elements","to","process","in","parallel",".","See","as_dataset","(",")","documentation",".","Returns",":","A","dataset","of","type","tf.data.Dataset",",","elements","of","which","are","2-tuples","of",":","-","An","item","or","sequence","of","items","or","batch","thereof","-","Auxiliary","info","for","the","items","(","i.e",".","ids",",","probs",")",".","Raises",":","NotImplementedError",":","If","`","sequence_preprocess_fn","!","=","None","`","is","passed","in","."]
code: def _as_dataset(
      self,
      sample_batch_size=None,
      num_steps=None,
      sequence_preprocess_fn=None,
      num_parallel_calls=None,
  ):
      """Creates a dataset that returns entries from the buffer in shuffled order.
  
      Args:
        sample_batch_size: (Optional.) An optional batch_size to specify the
          number of items to return. See as_dataset() documentation.
        num_steps: (Optional.)  Optional way to specify that sub-episodes are
          desired. See as_dataset() documentation.
        sequence_preprocess_fn: (Optional.) Preprocessing function for sequences
          before they are sharded into subsequences of length `num_steps` and
          batched.
        num_parallel_calls: (Optional.) Number elements to process in parallel.
          See as_dataset() documentation.
  
      Returns:
        A dataset of type tf.data.Dataset, elements of which are 2-tuples of:
  
          - An item or sequence of items or batch thereof
          - Auxiliary info for the items (i.e. ids, probs).
  
      Raises:
        NotImplementedError: If `sequence_preprocess_fn != None` is passed in.
      """
      if sequence_preprocess_fn is not None:
          raise NotImplementedError(
              "sequence_preprocess_fn is not supported."
          )
  
      def get_next(_):
          return self.get_next(
              sample_batch_size, num_steps, time_stacked=True
          )
  
      dataset = tf.data.Dataset.counter().map(
          get_next, num_parallel_calls=num_parallel_calls
      )
      return dataset
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import gin
  import numpy
  import tensorflow
  from tf_agents.replay_buffers import replay_buffer
  from tf_agents.replay_buffers import table
  from tf_agents.specs import tensor_spec
  from tf_agents.utils import common
  from tf_agents.utils import nest_utils
label_desc: Use image node_id 10 for calling the TFUniformReplayBuffer obj's underlying member method code with example usage: obj._as_dataset(sample_batch_size, num_steps, sequence_preprocess_fn, num_parallel_calls) and returns: dataset, self