code: def test_numpy_ufuncs_out(index):
      result = index == index
  
      out = np.empty(index.shape, dtype=bool)
      np.equal(index, index, out=out)
      tm.assert_numpy_array_equal(out, result)
  
      if not index._is_multi:
          # same thing on the ExtensionArray
          out = np.empty(index.shape, dtype=bool)
          np.equal(index.array, index.array, out=out)
          tm.assert_numpy_array_equal(out, result)
  
file_path: pandas/pandas/tests/indexes/test_numpy_compat.py
imports: import numpy
  import pytest
  from pandas import CategoricalIndex, DatetimeIndex, Index, PeriodIndex, TimedeltaIndex, isna
  import pandas._testing
  from pandas.api.types import is_complex_dtype, is_numeric_dtype
  from pandas.core.arrays import BooleanArray
  from pandas.core.indexes.datetimelike import DatetimeIndexOpsMixin
label_desc: Use image node_id 1 for calling a global function with example usage: test_numpy_ufuncs_out(index) without return types