code: def test_nan_raises(func, nargs, nan_policy):
      with pytest.raises(NotImplementedError):
          func(*(None,) * nargs, nan_policy=nan_policy)
  
file_path: dask/dask/array/tests/test_stats.py
imports: from __future__ import annotations
  import warnings
  import pytest
  from packaging.version import parse
  import numpy
  import dask.array
  import dask.array.stats
  from dask.array.utils import allclose, assert_eq
  from dask.delayed import Delayed
label_desc: Use image node_id 7 for calling a global function with example usage: test_nan_raises(func, nargs, nan_policy) without return types