code: def test_iforest_performance(global_random_seed):
      """Test Isolation Forest performs well"""
  
      # Generate train/test data
      rng = check_random_state(global_random_seed)
      X = 0.3 * rng.randn(600, 2)
      X = rng.permutation(np.vstack((X + 2, X - 2)))
      X_train = X[:1000]
  
      # Generate some abnormal novel observations
      X_outliers = rng.uniform(low=-1, high=1, size=(200, 2))
      X_test = np.vstack((X[1000:], X_outliers))
      y_test = np.array([0] * 200 + [1] * 200)
  
      # fit the model
      clf = IsolationForest(max_samples=100, random_state=rng).fit(
          X_train
      )
  
      # predict scores (the lower, the more normal)
      y_pred = -clf.decision_function(X_test)
  
      # check that there is at most 6 errors (false positive or false negative)
      assert roc_auc_score(y_test, y_pred) > 0.98
  
imports: import warnings
  from unittest.mock import Mock, patch
  import numpy
  import pytest
  from sklearn.datasets import load_diabetes, load_iris, make_classification
  from sklearn.ensemble import IsolationForest
  from sklearn.ensemble._iforest import _average_path_length
  from sklearn.metrics import roc_auc_score
  from sklearn.model_selection import ParameterGrid, train_test_split
  from sklearn.utils import check_random_state
  from sklearn.utils._testing import assert_allclose, assert_array_almost_equal, assert_array_equal, ignore_warnings
  from sklearn.utils.fixes import CSC_CONTAINERS, CSR_CONTAINERS
label_desc: Use image node_id 7 for calling a global function with example usage: test_iforest_performance(global_random_seed) without return types