class_docstr: DataLoaderIter class used to more quickly load a batch of indices at once.
class_docstr_tok: ["DataLoaderIter","class","used","to","more","quickly","load","a","batch","of","indices","at","once","."]
code: def __next__(self):
      # only chunk that is edited from base
      if self.iter._num_workers == 0:  # same-process loading
          indices = next(
              self.iter._sampler_iter
          )  # may raise StopIteration
          if len(indices) > 1:
              batch = self.iter._dataset[np.array(indices)]
          else:
              batch = self.iter._collate_fn(
                  [self.iter._dataset[i] for i in indices]
              )
  
          if self.iter._pin_memory:
              batch = _utils.pin_memory.pin_memory_batch(batch)
          return batch
      else:
          return next(self.iter)
  
imports: import os
  import pickle
  import sys
  import time
  import numpy
  import scipy.sparse
  from sklearn.datasets import load_svmlight_file
  import torch
  from torch.utils.data import DataLoader, Dataset
  from torch.utils.data.dataloader import _SingleProcessDataLoaderIter, _MultiProcessingDataLoaderIter, _utils
  from .None import constants
  from .None import syssettings
label_desc: Use image node_id 2 for calling the _ChunkDataLoaderIter obj's underlying member method code with example usage: obj.__next__() and returns: batch, next