code: def test_iforest_with_n_jobs_does_not_segfault(csc_container):
      """Check that Isolation Forest does not segfault with n_jobs=2
  
      Non-regression test for #23252
      """
      X, _ = make_classification(
          n_samples=85_000, n_features=100, random_state=0
      )
      X = csc_container(X)
      IsolationForest(n_estimators=10, max_samples=256, n_jobs=2).fit(X)
  
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 17 for calling a global function with example usage: test_iforest_with_n_jobs_does_not_segfault(csc_container) without return types