class_docstr: Iteratively stratify a multi-label data set into folds
  
  Construct an interative stratifier that splits the data set into folds trying to maintain balanced representation
  with respect to order-th label combinations.
  
  Attributes
  ----------
  
  n_splits : number of splits, int
      the number of folds to stratify into
  
  order : int, >= 1
      the order of label relationship to take into account when balancing sample distribution across labels
  
  sample_distribution_per_fold : None or List[float], :code:`(n_splits)`
      desired percentage of samples in each of the folds, if None and equal distribution of samples per fold
      is assumed i.e. 1/n_splits for each fold. The value is held in :code:`self.percentage_per_fold`.
  
  shuffle : bool
      Whether to shuffle the data before splitting into batches. Note that the samples within each split
      will not be shuffled.
  
  random_state : int, RandomState instance or None
      integer to seed the RNG, or the RNG state to use; if None (the default), will use the global
      state of numpy RNG
code: def __init__(
      self,
      n_splits=3,
      order=1,
      sample_distribution_per_fold=None,
      shuffle=False,
      random_state=None,
  ):
      self._rng_state = check_random_state(random_state)
      need_shuffle = shuffle or random_state is not None
      self.order = order
      super(IterativeStratification, self).__init__(
          n_splits,
          shuffle=need_shuffle,
          random_state=self._rng_state if need_shuffle else None,
      )
  
      if sample_distribution_per_fold:
          self.percentage_per_fold = sample_distribution_per_fold
      else:
          self.percentage_per_fold = [
              1 / float(self.n_splits) for _ in range(self.n_splits)
          ]
  
file_path: scikit-multilearn/skmultilearn/model_selection/iterative_stratification.py
imports: from sklearn.model_selection._split import _BaseKFold
  import numpy
  import scipy.sparse
  import itertools
  from sklearn.utils import check_random_state
label_desc: Use image node_id 1 to create a new IterativeStratification object from inherited base classes: _BaseKFold with example: obj = IterativeStratification(n_splits, order, sample_distribution_per_fold, shuffle, random_state)