code: def test_get_ood_features_scores():
      X_train = data["X_train"]
      X_test = data["X_test"]
  
      # Create OOD datapoint
      X_ood = np.array([[999999999.0, 999999999.0]])
  
      # Add OOD datapoint to X_test
      X_test_with_ood = np.vstack([X_test, X_ood])
  
      # Fit nearest neighbors on X_train
      knn = NearestNeighbors(n_neighbors=5, metric="euclidean").fit(
          X_train
      )
      # Get KNN distance as outlier score
      k = 5
      knn_distance_to_score, _ = outlier._get_ood_features_scores(
          features=X_test_with_ood, knn=knn, k=k
      )
      # Checking that X_ood has the smallest outlier score among all the datapoints
      assert np.argmin(knn_distance_to_score) == (
          knn_distance_to_score.shape[0] - 1
      )
  
      # Get KNN distance as outlier score without passing k
      # By default k=10 is used or k = n_neighbors when k > n_neighbors extracted from the knn
      knn_distance_to_score, _ = outlier._get_ood_features_scores(
          features=X_test_with_ood, knn=knn
      )
      # Checking that X_ood has the smallest outlier score among all the datapoints
      assert np.argmin(knn_distance_to_score) == (
          knn_distance_to_score.shape[0] - 1
      )
  
      # Get KNN distance as outlier score passing k and t > 1
      (
          large_t_knn_distance_to_score,
          _,
      ) = outlier._get_ood_features_scores(
          features=X_test_with_ood, knn=knn, k=k, t=5
      )
  
      # Checking that X_ood has the smallest outlier score among all the datapoints
      assert np.argmin(large_t_knn_distance_to_score) == (
          large_t_knn_distance_to_score.shape[0] - 1
      )
  
      # Get KNN distance as outlier score passing k and t < 1
      (
          small_t_knn_distance_to_score,
          _,
      ) = outlier._get_ood_features_scores(
          features=X_test_with_ood, knn=knn, k=k, t=0.002
      )
  
      # Checking that X_ood has the smallest outlier score among all the datapoints
      assert np.argmin(small_t_knn_distance_to_score) == (
          small_t_knn_distance_to_score.shape[0] - 1
      )
      assert np.sum(small_t_knn_distance_to_score) >= np.sum(
          large_t_knn_distance_to_score
      )
  
imports: import numpy
  import pandas
  import pytest
  from cleanlab.benchmarking.noise_generation import generate_noise_matrix_from_trace
  from cleanlab.benchmarking.noise_generation import generate_noisy_labels
  from cleanlab import count, outlier
  from cleanlab.count import get_confident_thresholds
  from cleanlab.outlier import OutOfDistribution
  from cleanlab.internal.label_quality_utils import get_normalized_entropy
  from sklearn.neighbors import NearestNeighbors
  from sklearn.linear_model import LogisticRegression
label_desc: Use image node_id 6 for calling a global function with example usage: test_get_ood_features_scores() without return types