code: def test_pruning_both(n_jobs):
      remove = 5
      s = data["labels"]
      class_idx = filter.find_label_issues(
          labels=s,
          pred_probs=data["pred_probs"],
          num_to_remove_per_class=remove,
          filter_by="prune_by_class",
          n_jobs=n_jobs,
      )
      nr_idx = filter.find_label_issues(
          labels=s,
          pred_probs=data["pred_probs"],
          num_to_remove_per_class=remove,
          filter_by="prune_by_noise_rate",
          n_jobs=n_jobs,
      )
      both_idx = filter.find_label_issues(
          labels=s,
          pred_probs=data["pred_probs"],
          num_to_remove_per_class=remove,
          filter_by="both",
          n_jobs=n_jobs,
      )
      assert all(s[both_idx] == s[class_idx & nr_idx])
  
imports: import cleanlab.multilabel_classification.dataset
  from cleanlab import count, filter
  from cleanlab.count import get_confident_thresholds, estimate_py_and_noise_matrices_from_probabilities
  from cleanlab.internal.latent_algebra import compute_inv_noise_matrix
  from cleanlab.benchmarking.noise_generation import generate_noise_matrix_from_trace
  from cleanlab.benchmarking.noise_generation import generate_noisy_labels
  from cleanlab.internal.util import value_counts
  from cleanlab.internal.multilabel_utils import int2onehot
  from cleanlab.experimental.label_issues_batched import find_label_issues_batched
  import numpy
  import scipy
  import pytest
  from sklearn.multioutput import MultiOutputClassifier
  from sklearn.linear_model import LogisticRegression
  from sklearn.model_selection import cross_val_predict
  from tempfile import mkdtemp
  import os.path
label_desc: Use image node_id 4 for calling a global function with example usage: test_pruning_both(n_jobs) without return types