class_docstr: Provides sliced data source.
  
  Args:
      data_source (:py:class:`DataSource <nnabla.utils.data_source.DataSource>`):
           Instance of DataSource class which provides data.
class_docstr_tok: ["Provides","sliced","data","source",".","Args",":","data_source","(",":","py",":","class",":","`","DataSource","<","nnabla.utils.data_source.DataSource",">","`",")",":","Instance","of","DataSource","class","which","provides","data","."]
code: def __init__(
      self,
      data_source,
      shuffle=False,
      rng=None,
      slice_start=None,
      slice_end=None,
  ):
      logger.info("Using SlicedDataSource")
      super(SlicedDataSource, self).__init__(shuffle=shuffle, rng=rng)
  
      self._data_source = data_source
      self._variables = data_source._variables[:]
      self._slice_start = slice_start
      self._slice_end = slice_end
      self._size = self._slice_end - self._slice_start
      self._generation = 0
  
imports: import warnings
  from collections import OrderedDict
  from contextlib import closing
  from multiprocessing import Queue
  from multiprocessing.pool import ThreadPool
  from shutil import rmtree
  import abc
  import atexit
  import warnings
  import h5py
  import csv
  import numpy
  import os
  import six
  import tempfile
  import threading
  from nnabla.config import nnabla_config
  from nnabla.logger import logger
  from nnabla.utils.progress import progress
  from nnabla.utils.communicator_util import single_or_rankzero
  from .data_source_loader import FileReader
label_desc: Use image node_id 1 to create a new SlicedDataSource object from inherited base classes: DataSource with example: obj = SlicedDataSource(data_source, shuffle, rng, slice_start, slice_end)