code: def test_arg_reductions(dfunc, func):
      x = np.random.default_rng().random((10, 10, 10))
      a = da.from_array(x, chunks=(3, 4, 5))
  
      assert_eq(dfunc(a), func(x))
      assert_eq(dfunc(a, 0), func(x, 0))
      assert_eq(dfunc(a, 1), func(x, 1))
      assert_eq(dfunc(a, 2), func(x, 2))
      with config.set(split_every=2):
          assert_eq(dfunc(a), func(x))
          assert_eq(dfunc(a, 0), func(x, 0))
          assert_eq(dfunc(a, 1), func(x, 1))
          assert_eq(dfunc(a, 2), func(x, 2))
      if _numpy_122:
          assert_eq(dfunc(a, keepdims=True), func(x, keepdims=True))
  
      pytest.raises(ValueError, lambda: dfunc(a, 3))
      pytest.raises(TypeError, lambda: dfunc(a, (0, 1)))
  
      x2 = np.arange(10)
      a2 = da.from_array(x2, chunks=3)
      assert_eq(dfunc(a2), func(x2))
      assert_eq(dfunc(a2, 0), func(x2, 0))
      assert_eq(dfunc(a2, 0, split_every=2), func(x2, 0))
  
      x3 = np.array(1)
      a3 = da.from_array(x3)
      assert_eq(dfunc(a3), func(x3))
  
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 9 for calling a global function with example usage: test_arg_reductions(dfunc, func) without return types