code: def test_categories_ndim_MultiIndex_gt_1_in_kwargs(df_checks):
      """
      Raise ValueError if categories is provided, but is not a 1D array.
      """
      arrays = [[1, 1, 2, 2], ["red", "blue", "red", "blue"]]
      arrays = pd.MultiIndex.from_arrays(
          arrays, names=("number", "color")
      )
      with pytest.raises(ValueError):
          df_checks.encode_categorical(region=arrays)
  
imports: import datetime
  import numpy
  import pandas
  import pytest
  from hypothesis import given, settings
  from pandas.testing import assert_frame_equal
  from janitor.testing_utils.strategies import categoricaldf_strategy, df_strategy
label_desc: Use image node_id 10 for calling a global function with example usage: test_categories_ndim_MultiIndex_gt_1_in_kwargs(df_checks) without return types