code: def test_chi2_contingency_trivial():
      # Some very simple tests for chi2_contingency.
  
      # A trivial case
      obs = np.array([[1, 2], [1, 2]])
      chi2, p, dof, expected = chi2_contingency(obs, correction=False)
      assert_equal(chi2, 0.0)
      assert_equal(p, 1.0)
      assert_equal(dof, 1)
      assert_array_equal(obs, expected)
  
      # A *really* trivial case: 1-D data.
      obs = np.array([1, 2, 3])
      chi2, p, dof, expected = chi2_contingency(obs, correction=False)
      assert_equal(chi2, 0.0)
      assert_equal(p, 1.0)
      assert_equal(dof, 0)
      assert_array_equal(obs, expected)
  
file_path: catboost/contrib/python/scipy/py2/scipy/stats/tests/test_contingency.py
imports: from __future__ import division, print_function, absolute_import
  import numpy
  from numpy.testing import assert_equal, assert_array_equal, assert_array_almost_equal, assert_approx_equal, assert_allclose
  from pytest import raises
  from scipy.special import xlogy
  from scipy.stats.contingency import margins, expected_freq, chi2_contingency
label_desc: Use image node_id 3 for calling a global function with example usage: test_chi2_contingency_trivial() without return types