code: def _get_residual_score_for_each_label(
      labels: np.ndarray,
      predictions: np.ndarray,
  ) -> np.ndarray:
      """Returns a residual label-quality score for each example.
  
      This is function to compute label-quality scores for regression datasets,
      where lower score indicate labels less likely to be correct.
  
      Residual based scores can work better for datasets where independent variables
      are based out of normal distribution.
  
      Parameters
      ----------
      labels: np.ndarray
          Labels in the same format expected by the `~cleanlab.regression.rank.get_label_quality_scores` function.
  
      predictions: np.ndarray
          Predicted labels in the same format expected by the `~cleanlab.regression.rank.get_label_quality_scores` function.
  
      Returns
      -------
      label_quality_scores: np.ndarray
          Contains one score (between 0 and 1) per example.
          Lower scores indicate more likely mislabled examples.
  
      """
      residual = predictions - labels
      label_quality_scores = np.exp(-abs(residual))
      return label_quality_scores
  
file_path: cleanlab/cleanlab/regression/rank.py
imports: from typing import Dict, Callable
  import numpy
  from numpy.typing import ArrayLike
  from sklearn.neighbors import NearestNeighbors
  from cleanlab.outlier import OutOfDistribution
  from cleanlab.internal.regression_utils import assert_valid_prediction_inputs
  from cleanlab.internal.constants import TINY_VALUE
label_desc: Use image node_id 2 for calling a global function with example usage: _get_residual_score_for_each_label(labels, predictions) and returns: label_quality_scores