code: def __init__(self, array, class_):
      assert type(array) is np.ndarray
      self.array = array
      self.i = 0
      self.class_ = class_
  
imports: import logging
  import numpy
  import torch.utils.data
  import torchvision
  from torch.utils.data.sampler import BatchSampler, RandomSampler
label_desc: Use image node_id 1 to create a new InfiniteSliceIterator object  with example: obj = InfiniteSliceIterator(array, class_)