code: def test_additive_chi2_sampler_exceptions():
      """Ensures correct error message"""
      transformer = AdditiveChi2Sampler()
      X_neg = X.copy()
      X_neg[0, 0] = -1
      with pytest.raises(
          ValueError, match="X in AdditiveChi2Sampler.fit"
      ):
          transformer.fit(X_neg)
      with pytest.raises(
          ValueError, match="X in AdditiveChi2Sampler.transform"
      ):
          transformer.fit(X)
          transformer.transform(X_neg)
  
imports: import re
  import numpy
  import pytest
  from sklearn.datasets import make_classification
  from sklearn.kernel_approximation import AdditiveChi2Sampler, Nystroem, PolynomialCountSketch, RBFSampler, SkewedChi2Sampler
  from sklearn.metrics.pairwise import chi2_kernel, kernel_metrics, polynomial_kernel, rbf_kernel
  from sklearn.utils._testing import assert_allclose, assert_array_almost_equal, assert_array_equal
  from sklearn.utils.fixes import CSR_CONTAINERS
label_desc: Use image node_id 9 for calling a global function with example usage: test_additive_chi2_sampler_exceptions() without return types