code: def test_union_non_object_dtype_raises():
      # GH#32646 raise NotImplementedError instead of less-informative error
      mi = MultiIndex.from_product([["a", "b"], [1, 2]])
  
      idx = mi.levels[1]
  
      msg = (
          "Can only union MultiIndex with MultiIndex or Index of tuples"
      )
      with pytest.raises(NotImplementedError, match=msg):
          mi.union(idx)
  
imports: import numpy
  import pytest
  import pandas
  from pandas import CategoricalIndex, DataFrame, Index, IntervalIndex, MultiIndex, Series
  import pandas._testing
  from pandas.api.types import is_float_dtype, is_unsigned_integer_dtype
label_desc: Use image node_id 24 for calling a global function with example usage: test_union_non_object_dtype_raises() without return types