code: def test_given_categorical_data_when_evaluating_has_categorical_then_returns_expected_result():
      assert has_categorical(np.array([["A", 2, 3], ["B", 4, 5]]))
      assert has_categorical(
          np.column_stack(
              [
                  np.array([True, False, False], dtype=object),
                  np.array([1, 2, 3], dtype=object),
              ]
          )
      )
      assert has_categorical(
          pd.DataFrame(
              {"X": [True, False, False], "Y": [1, 2, 3]}
          ).to_numpy()
      )
      assert not has_categorical(
          np.array([[1, 2, 3], [12.2, 2.3, 3.231]])
      )
  
imports: import random
  import networkx
  import numpy
  import pandas
  import pytest
  from _pytest.python_api import approx
  from dowhy import gcm
  from dowhy.gcm.util.general import apply_catboost_encoding, apply_one_hot_encoding, auto_apply_encoders, auto_fit_encoders, fit_catboost_encoders, fit_one_hot_encoders, has_categorical, is_categorical, is_discrete, set_random_seed, setdiff2d, shape_into_2d
label_desc: Use image node_id 3 for calling a global function with example usage: test_given_categorical_data_when_evaluating_has_categorical_then_returns_expected_result() without return types