code: def test_hash_array_index_exception():
      # GH42003 TypeError instead of AttributeError
      obj = pd.DatetimeIndex(
          ["2018-10-28 01:20:00"], tz="Europe/Berlin"
      )
  
      msg = "Use hash_pandas_object instead"
      with pytest.raises(TypeError, match=msg):
          hash_array(obj)
  
imports: import numpy
  import pytest
  import pandas
  from pandas import DataFrame, Index, MultiIndex, Series, period_range, timedelta_range
  import pandas._testing
  from pandas.core.util.hashing import hash_tuples
  from pandas.util import hash_array, hash_pandas_object
label_desc: Use image node_id 7 for calling a global function with example usage: test_hash_array_index_exception() without return types