class_docstr: StatefulDistributedSampler that does not generates random permutations but
  instead uses a fixed assignment of samples for each rank.
  
  Useful for debugging: it gives 100% reproducible sample assignments.
  
  Args:
      dataset (Dataset): Pytorch dataset from which to sample elements
      batch_size (int): batch size we want the sampler to sample
class_docstr_tok: ["StatefulDistributedSampler","that","does","not","generates","random","permutations","but","instead","uses","a","fixed","assignment","of","samples","for","each","rank",".","Useful","for","debugging",":","it","gives","100","%","reproducible","sample","assignments",".","Args",":","dataset","(","Dataset",")",":","Pytorch","dataset","from","which","to","sample","elements","batch_size","(","int",")",":","batch","size","we","want","the","sampler","to","sample"]
code: def __init__(self, dataset, batch_size=None):
      super().__init__(dataset, batch_size=batch_size)
      logging.info(f"rank: {self.rank}: DEBUGGING sampler created...")
  
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 1 to create a new DeterministicDistributedSampler object from inherited base classes: StatefulDistributedSampler with example: obj = DeterministicDistributedSampler(dataset, batch_size)