code: def test_basic(func):
      x = da.random.random((2, 3, 4), chunks=(1, 2, 2))
      x[x < 0.8] = 0
  
      y = x.map_blocks(sparse.COO.from_numpy)
  
      xx = func(x)
      yy = func(y)
  
      assert_eq(xx, yy, check_meta=False)
  
      if yy.shape:
          zz = yy.compute()
          if not isinstance(zz, sparse.COO):
              assert (zz != 1).sum() > np.prod(zz.shape) / 2
  
file_path: dask/dask/array/tests/test_sparse.py
imports: from __future__ import annotations
  import numpy
  import pytest
  from packaging.version import parse
  import dask
  import dask.array
  from dask.array.reductions import nannumel, numel
  from dask.array.utils import assert_eq
label_desc: Use image node_id 1 for calling a global function with example usage: test_basic(func) without return types