class_docstr: DataIterator
  Collect data from `data_source` and yields bunch of data.
  
  Args:
      data_source (:py:class:`DataSource <nnabla.utils.data_source.DataSource>`):
           Instance of DataSource class witch provides data for this class.
      batch_size (int): Size of data unit.
      rng (None or :obj:`numpy.random.RandomState`): Numpy random number
          generator.
      use_thread (bool): If ``use_thread`` is set to True, iterator will use another
          thread to fetch data. If ``use_thread`` is set to False, iterator will use
          current thread to fetch data.
      epoch_begin_callbacks (list of functions): An item is a function
          which takes an epoch index as a argument. These are called
          at the beginning of an epoch.
      epoch_end_callbacks (list of functions): An item is a function
          which takes an epoch index as a argument. These are called
          at the end of an epoch.
      stop_exhausted (bool): If ``stop_exhausted`` is set to False, iterator will be reset
          so that iteration can be continued. If ``stop_exhausted`` is set to True, iterator
          will raise StopIteration to stop the loop.
docstr: next
  
  It generates tuple of data.
  
  For example,
  if :py:meth:`self._variables == ('x', 'y')`
  This method returns :py:meth:` ( [[X] * batch_size], [[Y] * batch_size] )`
  
  Returns:
      tuple: tuple of data for mini-batch in numpy.ndarray.
code: def next(self):
      """next
  
      It generates tuple of data.
  
      For example,
      if :py:meth:`self._variables == ('x', 'y')`
      This method returns :py:meth:` ( [[X] * batch_size], [[Y] * batch_size] )`
  
      Returns:
          tuple: tuple of data for mini-batch in numpy.ndarray.
      """
      if not self._use_thread:
          self._next()
      data, n_reset = self._queue.get()
      self._queue.task_done()
      if self._use_thread:
          self._next_thread.join()
      if data is None:
          if (
              self._stop_exhausted
              and self._data_source.position + self._batch_size
              >= self._size
          ):
              raise StopIteration
          if self._use_thread:
              logger.log(99, "next() got None retrying...")
              self._next_thread = threading.Thread(target=self._next)
              self._next_thread.start()
              data, n_reset = self._queue.get()
              self._queue.task_done()
              self._next_thread.join()
      if self._use_thread:
          self._next_thread = threading.Thread(target=self._next)
          self._next_thread.start()
      for _ in range(n_reset):
          if self._current_epoch >= 0:
              self._callback_epoch_end()
          self._current_epoch += 1
          self._callback_epoch_begin()
      return data
  
imports: import atexit
  import threading
  import queue
  import numpy
  import six
  from nnabla.logger import logger
  from .data_source import DataSourceWithFileCache
  from .data_source import DataSourceWithMemoryCache
  from .data_source import SlicedDataSource
  from .data_source_implements import CacheDataSource
  from .data_source_implements import ConcatDataSource
  from .data_source_implements import CsvDataSource
  from .data_source_implements import SimpleDataSource
label_desc: Use image node_id 14 for calling the DataIterator obj's underlying member method code with example usage: obj.next() and returns: data