code: def _estimate_joint_multilabel(
      labels: list,
      pred_probs: np.ndarray,
      *,
      confident_joint: Optional[np.ndarray] = None,
  ) -> np.ndarray:
      """Parameters
       ----------
       labels : list
        Refer to documentation for this argument in filter.find_label_issues() for details.
  
       pred_probs : np.ndarray
         Refer to documentation for this argument in count.estimate_joint() for details.
  
      confident_joint : np.ndarray, optional
         Refer to documentation for this argument in filter.find_label_issues() with multi_label=True for details.
  
       Returns
       -------
       confident_joint_distribution : np.ndarray
         An array of shape ``(K, 2, 2)`` representing an
         estimate of the true joint distribution of noisy and true labels for each class, in a one-vs-rest format employed for multi-label settings.
      """
      y_one, num_classes = get_onehot_num_classes(labels, pred_probs)
      if confident_joint is None:
          calibrated_cj = compute_confident_joint(
              labels,
              pred_probs,
              calibrate=True,
              multi_label=True,
          )
      else:
          calibrated_cj = confident_joint
      assert isinstance(calibrated_cj, np.ndarray)
      calibrated_cf: np.ndarray = np.ndarray((num_classes, 2, 2))
      for class_num, (label, pred_prob_for_class) in enumerate(
          zip(y_one.T, pred_probs.T)
      ):
          pred_probs_binary = stack_complement(pred_prob_for_class)
          calibrated_cf[class_num] = estimate_joint(
              labels=label,
              pred_probs=pred_probs_binary,
              confident_joint=calibrated_cj[class_num],
          )
  
      return calibrated_cf
  
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 7 for calling a global function with example usage: _estimate_joint_multilabel(labels, pred_probs) and returns: calibrated_cf