code: def _get_subtype_label_quality_scores(
      labels: List[Dict[str, Any]],
      predictions: List[np.ndarray],
      *,
      alpha: Optional[float] = None,
      low_probability_threshold: Optional[float] = None,
      high_probability_threshold: Optional[float] = None,
      temperature: Optional[float] = None,
      aggregation_weights: Optional[Dict[str, float]] = None,
      overlapping_label_check: Optional[bool] = True,
  ) -> np.ndarray:
      """
      Returns a label quality score for each of the ``N`` images in the dataset.
      Score is between 0 and 1.
  
      1 - clean label (given label is likely correct).
      0 - dirty label (given label is likely incorrect).
  
      Parameters
      ----------
      labels:
          A list of ``N`` dictionaries such that ``labels[i]`` contains the given labels for the `i`-th image.
          Refer to documentation for this argument in :py:func:`find_label_issues <cleanlab.object_detection.filter.find_label_issues>` for further details.
  
      predictions:
          A list of ``N`` ``np.ndarray`` such that ``predictions[i]`` corresponds to the model predictions for the `i`-th image.
          Refer to documentation for this argument in :py:func:`find_label_issues <cleanlab.object_detection.filter.find_label_issues>` for further details.
  
      alpha:
          Optional weighting between IoU and Euclidean distance when calculating similarity between predicted and annotated boxes. High alpha means weighting IoU more heavily over Euclidean distance. If no alpha is provided, a good default is used.
  
      low_probability_threshold:
          Optional minimum probability threshold that determines which predicted boxes are considered when computing badly located scores. If not provided, a good default is used.
  
      high_probability_threshold:
          Optional probability threshold that determines which predicted boxes are considered high-confidence when computing overlooked and swapped scores. If not provided, a good default is used.
  
      temperature:
          Optional temperature of the softmin function where a lower score suggests softmin acts closer to min. If not provided, a good default is used.
  
      overlapping_label_check : bool, default = True
          If True, boxes annotated with more than one class label have their swap score penalized. Set this to False if you are not concerned when two very similar boxes exist with different class labels in the given annotations.
  
      Returns
      ---------
      label_quality_scores:
          As returned by :py:func:`get_label_quality_scores <cleanlab.outlier.get_label_quality_scores>`. See function for more details.
      """
      (
          alpha,
          low_probability_threshold,
          high_probability_threshold,
          temperature,
      ) = _get_valid_subtype_score_params(
          alpha,
          low_probability_threshold,
          high_probability_threshold,
          temperature,
      )
      auxiliary_inputs = _get_valid_inputs_for_compute_scores(
          alpha, labels, predictions
      )
      aggregation_weights = _get_aggregation_weights(
          aggregation_weights
      )
  
      overlooked_scores_per_box = compute_overlooked_box_scores(
          alpha=alpha,
          high_probability_threshold=high_probability_threshold,
          auxiliary_inputs=auxiliary_inputs,
      )
      overlooked_score_per_image = pool_box_scores_per_image(
          overlooked_scores_per_box, temperature=temperature
      )
  
      badloc_scores_per_box = compute_badloc_box_scores(
          alpha=alpha,
          low_probability_threshold=low_probability_threshold,
          auxiliary_inputs=auxiliary_inputs,
      )
      badloc_score_per_image = pool_box_scores_per_image(
          badloc_scores_per_box, temperature=temperature
      )
  
      swap_scores_per_box = compute_swap_box_scores(
          alpha=alpha,
          high_probability_threshold=high_probability_threshold,
          auxiliary_inputs=auxiliary_inputs,
          overlapping_label_check=overlapping_label_check,
      )
      swap_score_per_image = pool_box_scores_per_image(
          swap_scores_per_box, temperature=temperature
      )
  
      scores = (
          aggregation_weights["overlooked"]
          * np.log(TINY_VALUE + overlooked_score_per_image)
          + aggregation_weights["badloc"]
          * np.log(TINY_VALUE + badloc_score_per_image)
          + aggregation_weights["swap"]
          * np.log(TINY_VALUE + swap_score_per_image)
      )
  
      scores = np.exp(scores)
  
      return scores
  
imports: import warnings
  from cleanlab.internal.constants import ALPHA, CUSTOM_SCORE_WEIGHT_BADLOC, CUSTOM_SCORE_WEIGHT_OVERLOOKED, CUSTOM_SCORE_WEIGHT_SWAP, EUC_FACTOR, HIGH_PROBABILITY_THRESHOLD, LOW_PROBABILITY_THRESHOLD, MAX_ALLOWED_BOX_PRUNE, TINY_VALUE, TEMPERATURE, LABEL_OVERLAP_THRESHOLD
  import copy
  from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, TypeVar
  import numpy
  from cleanlab.internal.object_detection_utils import softmin1d, assert_valid_aggregation_weights, assert_valid_inputs
label_desc: Use image node_id 31 for calling a global function with example usage: _get_subtype_label_quality_scores(labels, predictions) and returns: scores