code: def test_index_with_int_dask_array_nocompute():
      """Test that when the indices are a dask array
      they are not accidentally computed
      """
  
      def crash():
          raise NotImplementedError()
  
      x = da.arange(5, chunks=-1, like=cupy.array(()))
      idx = da.Array(
          {("x", 0): (crash,)}, name="x", chunks=((2,),), dtype=np.int64
      )
      result = x[idx]
      with pytest.raises(NotImplementedError):
          result.compute()
  
file_path: dask/dask/array/tests/test_cupy_slicing.py
imports: from __future__ import annotations
  import numpy
  import pytest
  import dask.array
  from dask.array.utils import assert_eq
label_desc: Use image node_id 8 for calling a global function with example usage: test_index_with_int_dask_array_nocompute() without return types