code: def test_numpy_type_funcs(idx, func):
      msg = (
          f"ufunc '{func.__name__}' not supported for the input types, and the inputs "
          "could not be safely coerced to any supported types according to "
          "the casting rule ''safe''"
      )
      with pytest.raises(TypeError, match=msg):
          func(idx)
  
file_path: pandas/pandas/tests/indexes/multi/test_analytics.py
imports: import numpy
  import pytest
  import pandas
  from pandas import Index, MultiIndex, date_range, period_range
  import pandas._testing
label_desc: Use image node_id 13 for calling a global function with example usage: test_numpy_type_funcs(idx, func) without return types