code: def test_chi2_negative(csr_container):
      # Check for proper error on negative numbers in the input X.
      X, y = [[0, 1], [-1e-20, 1]], [0, 1]
      for X in (X, np.array(X), csr_container(X)):
          with pytest.raises(ValueError):
              chi2(X, y)
  
file_path: scikit-learn/sklearn/feature_selection/tests/test_chi2.py
imports: import warnings
  import numpy
  import pytest
  import scipy.stats
  from sklearn.feature_selection import SelectKBest, chi2
  from sklearn.feature_selection._univariate_selection import _chisquare
  from sklearn.utils._testing import assert_array_almost_equal, assert_array_equal
  from sklearn.utils.fixes import COO_CONTAINERS, CSR_CONTAINERS
label_desc: Use image node_id 4 for calling a global function with example usage: test_chi2_negative(csr_container) without return types