code: def _reduce_prune_counts(
      prune_count_matrix: np.ndarray, frac_noise: float = 1.0
  ) -> np.ndarray:
      """Reduce (multiply) all prune counts (non-diagonal) by frac_noise and
      increase diagonal by the total amount reduced in each column to
      preserve column counts.
  
      Parameters
      ----------
      prune_count_matrix : np.ndarray of shape (K, K), K = number of classes
          A counts of mislabeled examples in every class. For this function, it
          does not matter what the rows or columns are, but the diagonal terms
          reflect the number of correctly labeled examples.
  
      frac_noise : float
        Used to only return the "top" ``frac_noise * num_label_issues``. The choice of which "top"
        label issues to return is dependent on the `filter_by` method used. It works by reducing the
        size of the off-diagonals of the `prune_count_matrix` of given labels and true labels
        proportionally by `frac_noise` prior to estimating label issues with each method.
        When frac_noise=1.0, return all "confident" estimated noise indices (recommended).
      """
  
      new_mat = prune_count_matrix * frac_noise
      np.fill_diagonal(new_mat, prune_count_matrix.diagonal())
      np.fill_diagonal(
          new_mat,
          prune_count_matrix.diagonal()
          + np.sum(prune_count_matrix - new_mat, axis=0),
      )
  
      # These are counts, so return a matrix of ints.
      return new_mat.astype(int)
  
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 4 for calling a global function with example usage: _reduce_prune_counts(prune_count_matrix, frac_noise) and returns: new_mat