code: def test_like_funcs(funcname):
      mask = np.array([[True, False], [True, True], [False, True]])
      data = np.arange(6).reshape((3, 2))
      a = np.ma.array(data, mask=mask)
      d_a = da.ma.masked_array(data=data, mask=mask, chunks=2)
  
      da_func = getattr(da.ma, funcname)
      np_func = getattr(np.ma.core, funcname)
  
      res = da_func(d_a)
      sol = np_func(a)
  
      if "empty" in funcname:
          assert_eq(da.ma.getmaskarray(res), np.ma.getmaskarray(sol))
      else:
          assert_eq(res, sol)
  
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 22 for calling a global function with example usage: test_like_funcs(funcname) without return types