class_docstr: More fine-grained state DataSampler that uses training iteration and epoch
  both for shuffling data. PyTorch DistributedSampler only uses epoch
  for the shuffling and starts sampling data from the start. In case of training
  on very large data, we train for one epoch only and when we resume training,
  we want to resume the data sampler from the training iteration.
class_docstr_tok: ["More","fine-grained","state","DataSampler","that","uses","training","iteration","and","epoch","both","for","shuffling","data",".","PyTorch","DistributedSampler","only","uses","epoch","for","the","shuffling","and","starts","sampling","data","from","the","start",".","In","case","of","training","on","very","large","data",",","we","train","for","one","epoch","only","and","when","we","resume","training",",","we","want","to","resume","the","data","sampler","from","the","training","iteration","."]
docstr: Set the iteration number from which the sampling should start. This is
  used to find the marker in the data permutation order from where the
  sampler should start sampling.
docstr_tok: ["Set","the","iteration","number","from","which","the","sampling","should","start",".","This","is","used","to","find","the","marker","in","the","data","permutation","order","from","where","the","sampler","should","start","sampling","."]
code: def set_start_iter(self, start_iter):
      """
      Set the iteration number from which the sampling should start. This is
      used to find the marker in the data permutation order from where the
      sampler should start sampling.
      """
      self.start_iter = start_iter
  
imports: import contextlib
  import logging
  import queue
  from typing import Dict, List
  import numpy
  import torch
  from PIL import Image
  from torch.utils.data import Dataset
  from torch.utils.data.distributed import DistributedSampler
label_desc: Use image node_id 3 for calling the StatefulDistributedSampler obj's underlying member method code with example usage: obj.set_start_iter(start_iter) without return types