code: def data_iterator_cache(
      uri,
      batch_size,
      shuffle=False,
      rng=None,
      use_thread=True,
      normalize=True,
      with_memory_cache=True,
      epoch_begin_callbacks=[],
      epoch_end_callbacks=[],
      stop_exhausted=False,
  ):
      """data_iterator_cache
      Get data from the cache directory.
  
      Cache files are read from the local file system.
  
      For example,
  
      .. code-block:: python
  
          batch = data_iterator_cache('CACHE_DIR', batch_size, shuffle=True)
  
      Args:
          uri (str): Location of directory with cache files.
          batch_size (int): Size of data unit.
          shuffle (bool):
               Indicates whether the dataset is shuffled or not.
               Default value is False.
          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.
          normalize (bool): If True, each sample in the data gets normalized by a factor of 255.
              Default is True.
          with_memory_cache (bool):
              If ``True``, use :py:class:`.data_source.DataSourceWithMemoryCache`
              to wrap ``data_source``. It is a good idea to set this as true unless
              data_source provides on-memory data.
              Default value is True.
          epoch_begin_callbacks (list of functions): An item is a function
              which takes an epoch index as an 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 an 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.
  
  
      Returns:
          :py:class:`DataIterator <nnabla.utils.data_iterator.DataIterator>`:
              Instance of DataIterator
      """
      ds = CacheDataSource(
          uri, shuffle=shuffle, rng=rng, normalize=normalize
      )
  
      return data_iterator(
          ds,
          use_thread=use_thread,
          batch_size=batch_size,
          with_memory_cache=with_memory_cache,
          epoch_begin_callbacks=epoch_begin_callbacks,
          epoch_end_callbacks=epoch_end_callbacks,
          stop_exhausted=stop_exhausted,
      )
  
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 4 for calling a global function with example usage: data_iterator_cache(uri, batch_size, shuffle, rng, use_thread, normalize, with_memory_cache, epoch_begin_callbacks, epoch_end_callbacks, stop_exhausted) and returns: data_iterator