class_docstr: Sampler that restricts data loading to a subset of the dataset.
  
  It is especially useful in conjunction with
  :class:`torch.nn.parallel.DistributedDataParallel`. In such case, each
  process can pass a DistributedSampler instance as a DataLoader sampler,
  and load a subset of the original dataset that is exclusive to it.
  
  Dataset is assumed to be of constant size.
class_docstr_tok: ["Sampler","that","restricts","data","loading","to","a","subset","of","the","dataset",".","It","is","especially","useful","in","conjunction","with",":","class",":","`","torch.nn.parallel.DistributedDataParallel","`",".","In","such","case",",","each","process","can","pass","a","DistributedSampler","instance","as","a","DataLoader","sampler",",","and","load","a","subset","of","the","original","dataset","that","is","exclusive","to","it",".","Dataset","is","assumed","to","be","of","constant","size","."]
code: def set_epoch(self, epoch):
      self.epoch = epoch
  
imports: import math
  import random
  import numpy
  import torch
  import torch.distributed
  from PIL import Image, ImageEnhance, ImageOps
  from torch.utils.data import Sampler
label_desc: Use image node_id 4 for calling the SubsetDistributedSampler obj's underlying member method code with example usage: obj.set_epoch(epoch) without return types