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
docstr: Internal method for providing scikit-learn's split with folds
  
  Parameters
  ----------
  X : array-like, shape (n_samples, n_features)
      Training data, where n_samples is the number of samples
      and n_features is the number of features.
      Note that providing ``y`` is sufficient to generate the splits and
      hence ``np.zeros(n_samples)`` may be used as a placeholder for
      ``X`` instead of actual training data.
  y : array-like, shape (n_samples,)
      The target variable for supervised learning problems.
      Stratification is done based on the y labels.
  groups : object
      Always ignored, exists for compatibility.
  
  Yields
  ------
  fold : List[int]
      indexes of test samples for a given fold, yielded for each of the folds
docstr_tok: ["Internal","method","for","providing","scikit-learn","'s","split","with","folds","Parameters","--","--","--","--","--","X",":","array-like",",","shape","(","n_samples",",","n_features",")","Training","data",",","where","n_samples","is","the","number","of","samples","and","n_features","is","the","number","of","features",".","Note","that","providing","``","y","``","is","sufficient","to","generate","the","splits","and","hence","``","np.zeros","(","n_samples",")","``","may","be","used","as","a","placeholder","for","``","X","``","instead","of","actual","training","data",".","y",":","array-like",",","shape","(","n_samples",",",")","The","target","variable","for","supervised","learning","problems",".","Stratification","is","done","based","on","the","y","labels",".","groups",":","object","Always","ignored",",","exists","for","compatibility",".","Yields","--","--","--","fold",":","List","[","int","]","indexes","of","test","samples","for","a","given","fold",",","yielded","for","each","of","the","folds"]
code: def _iter_test_indices(self, X, y=None, groups=None):
      """Internal method for providing scikit-learn's split with folds
  
      Parameters
      ----------
      X : array-like, shape (n_samples, n_features)
          Training data, where n_samples is the number of samples
          and n_features is the number of features.
          Note that providing ``y`` is sufficient to generate the splits and
          hence ``np.zeros(n_samples)`` may be used as a placeholder for
          ``X`` instead of actual training data.
      y : array-like, shape (n_samples,)
          The target variable for supervised learning problems.
          Stratification is done based on the y labels.
      groups : object
          Always ignored, exists for compatibility.
  
      Yields
      ------
      fold : List[int]
          indexes of test samples for a given fold, yielded for each of the folds
      """
      (
          rows,
          rows_used,
          all_combinations,
          per_row_combinations,
          samples_with_combination,
          folds,
      ) = self._prepare_stratification(y)
  
      self._distribute_positive_evidence(
          rows_used,
          folds,
          samples_with_combination,
          per_row_combinations,
      )
      self._distribute_negative_evidence(rows_used, folds)
  
      for fold in folds:
          yield fold
  
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 5 for calling the IterativeStratification obj's underlying member method code with example usage: obj._iter_test_indices(X, y, groups) without return types