code: def test_assert_multi_index_dtype_check_categorical(
      check_categorical,
  ):
      # GH#52126
      idx1 = MultiIndex.from_arrays(
          [Categorical(np.array([1, 2], dtype=np.uint64))]
      )
      idx2 = MultiIndex.from_arrays(
          [Categorical(np.array([1, 2], dtype=np.int64))]
      )
      if check_categorical:
          with pytest.raises(
              AssertionError,
              match=r"^MultiIndex level \[0\] are different",
          ):
              tm.assert_index_equal(
                  idx1, idx2, check_categorical=check_categorical
              )
      else:
          tm.assert_index_equal(
              idx1, idx2, check_categorical=check_categorical
          )
  
imports: import numpy
  import pytest
  from pandas import NA, Categorical, CategoricalIndex, Index, MultiIndex, NaT, RangeIndex
  import pandas._testing
label_desc: Use image node_id 21 for calling a global function with example usage: test_assert_multi_index_dtype_check_categorical(check_categorical) without return types