code: def test_get_category_map(categorical_columns, df):
      # test numpy case with no categorical_columns raises error
      if df is arr and (
          categorical_columns is None
          or categorical_columns == ["col2", "col4"]
      ):
          with pytest.raises(ValueError):
              _ = gen_category_map(df)
  
      else:
          category_map = gen_category_map(
              df, categorical_columns=categorical_columns
          )
          assert category_map == expected_category_map
  
imports: import pytest
  import pandas
  from alibi.utils.data import gen_category_map
label_desc: Use image node_id 1 for calling a global function with example usage: test_get_category_map(categorical_columns, df) without return types