code: def _next_ssi(self):
      if not self.unique_cpb:
          self._ssi = (self._ssi + self.cpb) % self.num_classes
          if self._ssi == 0:
              self._next_perm()
      else:
          self._ssi += self.cpb * self.world_size
          max_end = self._ssi + self.cpb * (self.world_size - self.rank)
          if max_end > self.num_classes:
              self._ssi = self.rank * self.cpb
              self._next_perm()
  
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 7 for calling the StratifiedClassSampler obj's underlying member method code with example usage: obj._next_ssi() without return types