code: def reduction_0d_test(da_func, darr, np_func, narr):
      expected = np_func(narr)
      actual = da_func(darr)
  
      assert_eq(actual, expected)
      assert_eq(
          da_func(narr), expected
      )  # Ensure Dask reductions work with NumPy arrays
      assert actual.size == 1
  
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 2 for calling a global function with example usage: reduction_0d_test(da_func, darr, np_func, narr) without return types