code: def test_reductions(dtype, reduction):
      x = (np.random.default_rng(42).random((11, 11)) * 10).astype(
          dtype
      )
      dx = da.from_array(x, chunks=(4, 4))
      mx = np.ma.masked_greater(x, 5)
      mdx = da.ma.masked_greater(dx, 5)
  
      dfunc = getattr(da, reduction)
      func = getattr(np, reduction)
  
      assert_eq_ma(dfunc(mdx), func(mx))
      assert_eq_ma(dfunc(mdx, axis=0), func(mx, axis=0))
      assert_eq_ma(
          dfunc(mdx, keepdims=True, split_every=4),
          func(mx, keepdims=True),
      )
      assert_eq_ma(dfunc(mdx, axis=0, split_every=2), func(mx, axis=0))
      assert_eq_ma(
          dfunc(mdx, axis=0, keepdims=True, split_every=2),
          func(mx, axis=0, keepdims=True),
      )
      assert_eq_ma(dfunc(mdx, axis=1, split_every=2), func(mx, axis=1))
      assert_eq_ma(
          dfunc(mdx, axis=1, keepdims=True, split_every=2),
          func(mx, axis=1, keepdims=True),
      )
  
imports: from __future__ import annotations
  import random
  import sys
  from copy import deepcopy
  from itertools import product
  import numpy
  import pytest
  import dask.array
  from dask.array.numpy_compat import ComplexWarning, _numpy_123
  from dask.array.utils import assert_eq
  from dask.base import tokenize
  from dask.utils import typename
label_desc: Use image node_id 12 for calling a global function with example usage: test_reductions(dtype, reduction) without return types