code: def test_bad_association_args():
      # Invalid Test Statistic
      assert_raises(ValueError, association, [[1, 2], [3, 4]], "X")
      # Invalid array shape
      assert_raises(
          ValueError, association, [[[1, 2]], [[3, 4]]], "cramer"
      )
      # chi2_contingency exception
      assert_raises(
          ValueError, association, [[-1, 10], [1, 2]], "cramer"
      )
      # Invalid Array Item Data Type
      assert_raises(
          ValueError,
          association,
          np.array([[1, 2], ["dd", 4]], dtype=object),
          "cramer",
      )
  
file_path: catboost/contrib/python/scipy/py3/scipy/stats/tests/test_contingency.py
imports: import numpy
  from numpy.testing import assert_equal, assert_array_equal, assert_array_almost_equal, assert_approx_equal, assert_allclose
  import pytest
  from pytest import raises
  from scipy.special import xlogy
  from scipy.stats.contingency import margins, expected_freq, chi2_contingency, association
label_desc: Use image node_id 8 for calling a global function with example usage: test_bad_association_args() without return types