class_docstr: Describes a batch or sub-batch of work in sample mode that consists of SampleInfo
  instances with consecutive indices. It denotes range of samples within given `iteration`
  of given `epoch_idx`, optionally specifying a slice/sub-range of the sample range.
  It does not support spanning over multiple batches. Used to avoid linear dependency of the task
  description size on the batch size.
code: def __getitem__(self, idx):
      if isinstance(idx, slice):
          return self._get_slice(idx)
      if idx < 0:
          idx_in_batch = self.slice_end + idx
      else:
          idx_in_batch = self.slice_start + idx
      if (
          idx_in_batch < self.slice_start
          or idx_in_batch >= self.slice_end
      ):
          raise IndexError(
              "Index {} out of range for slice of length {}".format(
                  idx, len(self)
              )
          )
      return SampleInfo(
          self.sample_start + idx_in_batch,
          idx_in_batch,
          self.iteration,
          self.epoch_idx,
      )
  
imports: from typing import Optional
  from nvidia.dali.types import SampleInfo
  from nvidia.dali._multiproc.struct_message import Structure
label_desc: Use image node_id 4 for calling the SampleRange obj's underlying member method code with example usage: obj.__getitem__(idx) and returns: SampleInfo, self