code: def test_array_cumreduction_axis(func, use_nan, axis, method):
      np_func = getattr(np, func)
      da_func = getattr(da, func)
  
      s = (10, 11, 12)
      a = np.arange(np.prod(s), dtype=float).reshape(s)
      if use_nan:
          a[1] = np.nan
      d = da.from_array(a, chunks=(4, 5, 6))
      if (
          func in ["cumprod", "nancumprod"]
          and method == "blelloch"
          and axis is None
      ):
          with pytest.warns(RuntimeWarning):
              da_func(d, axis=axis, method=method).compute()
              return
  
      a_r = np_func(a, axis=axis)
      d_r = da_func(d, axis=axis, method=method)
  
      assert_eq(a_r, d_r)
  
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 30 for calling a global function with example usage: test_array_cumreduction_axis(func, use_nan, axis, method) without return types