class_docstr: ReproducibleShuffleBatchSampler will apply a deterministic shuffle based on a seed.
  
  .. warning::
  
     Always shuffle before skipping and before repeating.  Skip-before-shuffle would break
     the reproducibility of the shuffle, and repeat-before-shuffle would cause the shuffle
     to hang as it iterates through an infinite sampler.
  
  .. warning::
  
     Always prefer ReproducibleShuffleSampler over this class when possible.  The reason is that
     shuffling at the batch level results in a superior shuffle, where the contents of each
     batch are varied between epochs, rather than just the order of batches.
class_docstr_tok: ["ReproducibleShuffleBatchSampler","will","apply","a","deterministic","shuffle","based","on","a","seed",".","..","warning",":",":","Always","shuffle","before","skipping","and","before","repeating",".","Skip-before-shuffle","would","break","the","reproducibility","of","the","shuffle",",","and","repeat-before-shuffle","would","cause","the","shuffle","to","hang","as","it","iterates","through","an","infinite","sampler",".","..","warning",":",":","Always","prefer","ReproducibleShuffleSampler","over","this","class","when","possible",".","The","reason","is","that","shuffling","at","the","batch","level","results","in","a","superior","shuffle",",","where","the","contents","of","each","batch","are","varied","between","epochs",",","rather","than","just","the","order","of","batches","."]
code: def __init__(
      self, batch_sampler: torch.utils.data.BatchSampler, seed: int
  ) -> None:
      self._batch_sampler = batch_sampler
      self._rng = np.random.RandomState(seed)
  
imports: from typing import Iterator
  import numpy
  import torch
label_desc: Use image node_id 1 to create a new ReproducibleShuffleBatchSampler object from inherited base classes: torch.utils.data with example: obj = ReproducibleShuffleBatchSampler(batch_sampler, seed)