code: def _multiclass_crossval_predict(
      labels: list, pred_probs: np.ndarray
  ) -> np.ndarray:  # pragma: no cover
      """Returns a numpy 2D array of one-hot encoded
      multiclass predictions. Each row in the array
      provides the predictions for a particular example.
      The boundary condition used to threshold predictions
      is computed by maximizing the F1 ROC curve.
  
      Parameters
      ----------
      labels : list of lists (length N)
        These are multiclass labels. Each list in the list contains all the
        labels for that example.
  
      pred_probs : np.ndarray (shape (N, K))
          P(label=k|x) is a matrix with K model-predicted probabilities.
          Each row of this matrix corresponds to an example `x` and contains the model-predicted
          probabilities that `x` belongs to each possible class.
          The columns must be ordered such that these probabilities correspond to class 0,1,2,...
          `pred_probs` should have been computed using 3 (or higher) fold cross-validation.
      """
  
      from sklearn.metrics import f1_score
  
      boundaries = np.arange(0.05, 0.9, 0.05)
      K = get_num_classes(
          labels=labels,
          pred_probs=pred_probs,
          multi_label=True,
      )
      labels_one_hot = int2onehot(labels, K)
      f1s = [
          f1_score(
              labels_one_hot,
              (pred_probs > boundary).astype(np.uint8),
              average="micro",
          )
          for boundary in boundaries
      ]
      boundary = boundaries[np.argmax(f1s)]
      pred = (pred_probs > boundary).astype(np.uint8)
      return pred
  
imports: import numpy
  from sklearn.metrics import confusion_matrix
  import multiprocessing
  import sys
  import warnings
  from typing import Any, Dict, Optional, Tuple, List
  from functools import reduce
  import platform
  from cleanlab.count import calibrate_confident_joint, num_label_issues, _reduce_issues
  from cleanlab.rank import order_label_issues, get_label_quality_scores
  import cleanlab.internal.multilabel_scorer
  from cleanlab.internal.validation import assert_valid_inputs
  from cleanlab.internal.util import value_counts_fill_missing_classes, round_preserving_row_totals, get_num_classes
  from cleanlab.internal.multilabel_utils import stack_complement, get_onehot_num_classes, int2onehot
  from cleanlab.typing import LabelLike
  from cleanlab.multilabel_classification.filter import find_multilabel_issues_per_class
label_desc: Use image node_id 13 for calling a global function with example usage: _multiclass_crossval_predict(labels, pred_probs) and returns: pred