code: def _get_confident_thresholds_multilabel(
      labels: list,
      pred_probs: np.ndarray,
  ):
      """Returns expected (average) "self-confidence" for each class.
  
      The confident class threshold for a class j is the expected (average) "self-confidence" for class j in a one-vs-rest setting.
  
      Parameters
      ----------
      labels: list
         Refer to documentation for this argument in ``count.calibrate_confident_joint()`` with ``multi_label=True`` for details.
  
      pred_probs : np.ndarray
         Predicted class probabilities in the same format expected by the `~cleanlab.count.get_confident_thresholds` function.
  
      Returns
      -------
      confident_thresholds : np.ndarray
        An array of shape ``(K, 2, 2)`` where `K` is the number of classes, in a one-vs-rest format.
      """
      y_one, num_classes = get_onehot_num_classes(labels, pred_probs)
      confident_thresholds: np.ndarray = np.ndarray((num_classes, 2))
      for class_num, (
          label_for_class,
          pred_prob_for_class,
      ) in enumerate(zip(y_one.T, pred_probs.T)):
          pred_probs_binary = stack_complement(pred_prob_for_class)
          confident_thresholds[class_num] = get_confident_thresholds(
              pred_probs=pred_probs_binary, labels=label_for_class
          )
      return confident_thresholds
  
imports: from sklearn.linear_model import LogisticRegression
  from sklearn.model_selection import StratifiedKFold
  from sklearn.metrics import confusion_matrix
  import sklearn.base
  import numpy
  import warnings
  from typing import Tuple, Union, Optional
  from cleanlab.typing import LabelLike
  from cleanlab.internal.multilabel_utils import stack_complement, get_onehot_num_classes
  from cleanlab.internal.constants import TINY_VALUE, CONFIDENT_THRESHOLDS_LOWER_BOUND, FLOATING_POINT_COMPARISON
  from cleanlab.internal.util import value_counts_fill_missing_classes, clip_values, clip_noise_rates, round_preserving_row_totals, append_extra_datapoint, train_val_split, get_num_classes, get_unique_classes, is_torch_dataset, is_tensorflow_dataset
  from cleanlab.internal.latent_algebra import compute_inv_noise_matrix, compute_py, compute_noise_matrix_from_inverse
  from cleanlab.internal.validation import assert_valid_inputs, labels_to_array
label_desc: Use image node_id 18 for calling a global function with example usage: _get_confident_thresholds_multilabel(labels, pred_probs) and returns: confident_thresholds