code: def test_index_with_int_dask_array_nanchunks(chunks):
      # Slice by array with nan-sized chunks
      a = da.from_array(cupy.arange(-2, 3), chunks=chunks)
      assert_eq(a[a.nonzero()], cupy.array([-2, -1, 1, 2]))
      # Edge case: the nan-sized chunks resolve to size 0
      a = da.zeros_like(cupy.array(()), shape=5, chunks=chunks)
      assert_eq(a[a.nonzero()], cupy.array([]))
  
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 4 for calling a global function with example usage: test_index_with_int_dask_array_nanchunks(chunks) without return types