code: def test_nan_func_does_not_warn(func):
      # non-regression test for #6105
      x = np.ones((10,)) * np.nan
      x[0] = 1
      x[1] = 2
      d = da.from_array(x, chunks=2)
      with warnings.catch_warnings(record=True) as rec:
          getattr(da, func)(d).compute()
      assert not rec
  
imports: from __future__ import annotations
  import os
  import warnings
  from contextlib import nullcontext
  from itertools import permutations, zip_longest
  import pytest
  import itertools
  import dask.array
  import dask.config
  from dask.array.numpy_compat import ComplexWarning, _numpy_122
  from dask.array.utils import assert_eq, same_keys
  from dask.core import get_deps
label_desc: Use image node_id 43 for calling a global function with example usage: test_nan_func_does_not_warn(func) without return types