code: def _filter_by_class(
      labels: List[Dict[str, Any]],
      predictions: List[np.ndarray],
      class_num: int,
  ) -> Tuple[List, List]:
      """
      Filters predictions and labels based on a specific class number.
      """
      pred_bboxes = [
          prediction[class_num] for prediction in predictions
      ]
      lab_bboxes = []
      for label in labels:
          gt_inds = label["labels"] == class_num
          lab_bboxes.append(label["bboxes"][gt_inds, :])
      return pred_bboxes, lab_bboxes
  
file_path: cleanlab/cleanlab/object_detection/filter.py
imports: from collections import defaultdict
  from multiprocessing import Pool
  from typing import Any, Dict, List, Optional, Tuple, Union
  import numpy
  from cleanlab.internal.constants import ALPHA, HIGH_PROBABILITY_THRESHOLD, LOW_PROBABILITY_THRESHOLD, OVERLOOKED_THRESHOLD_FACTOR, BADLOC_THRESHOLD_FACTOR, SWAP_THRESHOLD_FACTOR, AP_SCALE_FACTOR
  from cleanlab.internal.object_detection_utils import assert_valid_inputs
  from cleanlab.object_detection.rank import _get_valid_inputs_for_compute_scores, _separate_label, _separate_prediction, compute_badloc_box_scores, compute_overlooked_box_scores, compute_swap_box_scores, get_label_quality_scores, issues_from_scores, _get_overlap_matrix
label_desc: Use image node_id 7 for calling a global function with example usage: _filter_by_class(labels, predictions, class_num) and returns: pred_bboxes,  lab_bboxes