code: def test_lof_performance(global_dtype):
      # Generate train/test data
      rng = check_random_state(2)
      X = 0.3 * rng.randn(120, 2).astype(global_dtype, copy=False)
      X_train = X[:100]
  
      # Generate some abnormal novel observations
      X_outliers = rng.uniform(low=-4, high=4, size=(20, 2)).astype(
          global_dtype, copy=False
      )
      X_test = np.r_[X[100:], X_outliers]
      y_test = np.array([0] * 20 + [1] * 20)
  
      # fit the model for novelty detection
      clf = neighbors.LocalOutlierFactor(novelty=True).fit(X_train)
  
      # predict scores (the lower, the more normal)
      y_pred = -clf.decision_function(X_test)
  
      # check that roc_auc is good
      assert roc_auc_score(y_test, y_pred) > 0.99
  
imports: import re
  from math import sqrt
  import numpy
  import pytest
  from sklearn import metrics, neighbors
  from sklearn.datasets import load_iris
  from sklearn.metrics import roc_auc_score
  from sklearn.utils import check_random_state
  from sklearn.utils._testing import assert_allclose, assert_array_equal
  from sklearn.utils.estimator_checks import check_outlier_corruption, parametrize_with_checks
  from sklearn.utils.fixes import CSR_CONTAINERS
label_desc: Use image node_id 2 for calling a global function with example usage: test_lof_performance(global_dtype) without return types