code: def test_given_categorical_X_or_Y_when_perform_generalised_cov_based_independence_test_then_raise_error():
      with pytest.raises(ValueError):
          generalised_cov_based(
              np.random.choice(2, 1000, replace=True).astype(str),
              np.random.normal(0, 1, 1000),
          )
  
      with pytest.raises(ValueError):
          generalised_cov_based(
              np.random.normal(0, 1, 1000),
              np.random.choice(2, 1000, replace=True).astype(str),
          )
  
file_path: dowhy/tests/gcm/independence_test/test_generalised_cov_measure.py
imports: import random
  import numpy
  import pytest
  from flaky import flaky
  from dowhy.gcm import generalised_cov_based
  from tests.gcm.independence_test.test_kernel import _generate_categorical_data
label_desc: Use image node_id 8 for calling a global function with example usage: test_given_categorical_X_or_Y_when_perform_generalised_cov_based_independence_test_then_raise_error() without return types