code: def _find_label_issues(
      labels: List[Dict[str, Any]],
      predictions: List[np.ndarray],
      *,
      scoring_method: Optional[str] = "objectlab",
      return_indices_ranked_by_score: Optional[bool] = True,
      overlapping_label_check: Optional[bool] = True,
  ):
      """Internal function to find label issues based on passed in method."""
  
      if scoring_method == "objectlab":
          auxiliary_inputs = _get_valid_inputs_for_compute_scores(
              ALPHA, labels, predictions
          )
  
          per_class_scores = _get_per_class_ap(labels, predictions)
          lab_list = [_separate_label(label)[1] for label in labels]
          pred_list = [
              _separate_prediction(pred)[1] for pred in predictions
          ]
          pred_thresholds_list = _process_class_list(
              pred_list, per_class_scores
          )
          lab_thresholds_list = _process_class_list(
              lab_list, per_class_scores
          )
          overlooked_scores_per_box = compute_overlooked_box_scores(
              alpha=ALPHA,
              high_probability_threshold=HIGH_PROBABILITY_THRESHOLD,
              auxiliary_inputs=auxiliary_inputs,
          )
          overlooked_issues_per_box = _find_label_issues_per_box(
              overlooked_scores_per_box,
              pred_thresholds_list,
              OVERLOOKED_THRESHOLD_FACTOR,
          )
          overlooked_issues_per_image = _pool_box_scores_per_image(
              overlooked_issues_per_box
          )
  
          badloc_scores_per_box = compute_badloc_box_scores(
              alpha=ALPHA,
              low_probability_threshold=LOW_PROBABILITY_THRESHOLD,
              auxiliary_inputs=auxiliary_inputs,
          )
          badloc_issues_per_box = _find_label_issues_per_box(
              badloc_scores_per_box,
              lab_thresholds_list,
              BADLOC_THRESHOLD_FACTOR,
          )
          badloc_issues_per_image = _pool_box_scores_per_image(
              badloc_issues_per_box
          )
  
          swap_scores_per_box = compute_swap_box_scores(
              alpha=ALPHA,
              high_probability_threshold=HIGH_PROBABILITY_THRESHOLD,
              overlapping_label_check=overlapping_label_check,
              auxiliary_inputs=auxiliary_inputs,
          )
          swap_issues_per_box = _find_label_issues_per_box(
              swap_scores_per_box,
              lab_thresholds_list,
              SWAP_THRESHOLD_FACTOR,
          )
          swap_issues_per_image = _pool_box_scores_per_image(
              swap_issues_per_box
          )
  
          issues_per_image = (
              overlooked_issues_per_image
              + badloc_issues_per_image
              + swap_issues_per_image
          )
          is_issue = issues_per_image > 0
      else:
          is_issue = np.full(
              shape=[
                  len(labels),
              ],
              fill_value=-1,
          )
  
      if return_indices_ranked_by_score:
          scores = get_label_quality_scores(labels, predictions)
          sorted_scores_idx = issues_from_scores(scores, threshold=1.0)
          is_issue_idx = np.where(is_issue == True)[0]
          sorted_issue_mask = np.in1d(
              sorted_scores_idx, is_issue_idx, assume_unique=True
          )
          issue_idx = sorted_scores_idx[sorted_issue_mask]
          return issue_idx
      else:
          return is_issue
  
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 2 for calling a global function with example usage: _find_label_issues(labels, predictions) and returns: issue_idx, is_issue