code: def get_cross_validated_multilabel_pred_probs(
      X, labels: np.ndarray, *, clf, cv
  ) -> np.ndarray:
      """Get predicted probabilities for a multi-label classifier via cross-validation.
  
      Note
      ----
      The labels are reformatted to a "multi-class" format internally to support a wider range of cross-validation strategies.
      If you have a multi-label dataset with `K` classes, the labels are reformatted to a "multi-class" format with up to `2**K` classes
      (i.e. the number of possible class-assignment configurations).
      It is unlikely that you'll all `2**K` configurations in your dataset.
  
      Parameters
      ----------
      X :
          A 2d array of features of shape (N, M) where N is the number of samples and M is the number of features.
  
      labels :
          A 2d array of binarized multi-labels of shape (N, K) where N is the number of samples and K is the number of classes.
  
      clf :
          A multi-label classifier with a ``predict_proba`` method.
  
      cv :
          A cross-validation splitter with a ``split`` method that returns a generator of train/test indices.
  
      Returns
      -------
      pred_probs :
          A 2d array of predicted probabilities of shape (N, K) where N is the number of samples and K is the number of classes.
  
          Note
          ----
          The predicted probabilities are not expected to sum to 1 for each sample in the case of multi-label classification.
  
      Examples
      --------
      >>> import numpy as np
      >>> from sklearn.model_selection import KFold
      >>> from sklearn.multiclass import OneVsRestClassifier
      >>> from sklearn.ensemble import RandomForestClassifier
      >>> from cleanlab.internal.multilabel_scorer import get_cross_validated_multilabel_pred_probs
      >>> np.random.seed(0)
      >>> X = np.random.rand(16, 2)
      >>> labels = np.random.randint(0, 2, size=(16, 2))
      >>> clf = OneVsRestClassifier(RandomForestClassifier())
      >>> cv = KFold(n_splits=2)
      >>> get_cross_validated_multilabel_pred_probs(X, labels, clf=clf, cv=cv)
      """
      split_generator = _get_split_generator(labels, cv)
      pred_probs = cross_val_predict(
          clf, X, labels, cv=split_generator, method="predict_proba"
      )
      return pred_probs
  
imports: from enum import Enum
  from typing import Callable, Dict, Optional, Union
  import numpy
  from sklearn.model_selection import cross_val_predict
  from cleanlab.internal.multilabel_utils import _is_multilabel, stack_complement
  from cleanlab.internal.label_quality_utils import _subtract_confident_thresholds
  from cleanlab.internal.numerics import softmax
  from cleanlab.rank import get_self_confidence_for_each_label, get_normalized_margin_for_each_label, get_confidence_weighted_entropy_for_each_label
label_desc: Use image node_id 6 for calling a global function with example usage: get_cross_validated_multilabel_pred_probs(X, labels) and returns: pred_probs