def METHOD_NAME():
  while True:
    if sample_batch_size is not None:
      batch = [
          self._get_next(num_steps=num_steps, time_stacked=False)
          for _ in range(sample_batch_size)
      ]
      item = nest_utils.stack_nested_arrays(batch)
    else:
      item = self._get_next(num_steps=num_steps, time_stacked=False)
    yield tuple(tf.nest.flatten(item))