code: def test_metadata():
      y = da.random.random((10, 10), chunks=(5, 5))
      y[y < 0.8] = 0
      z = sparse.COO.from_numpy(y.compute())
      y = y.map_blocks(sparse.COO.from_numpy)
  
      assert isinstance(y._meta, sparse.COO)
      assert isinstance((y + 1)._meta, sparse.COO)
      assert isinstance(y.sum(axis=0)._meta, sparse.COO)
      assert isinstance(y.var(axis=0)._meta, sparse.COO)
      assert isinstance(y[:5, ::2]._meta, sparse.COO)
      assert isinstance(y.rechunk((2, 2))._meta, sparse.COO)
      assert isinstance((y - z)._meta, sparse.COO)
      assert isinstance(y.persist()._meta, sparse.COO)
      assert isinstance(np.concatenate([y, y])._meta, sparse.COO)
      assert isinstance(np.concatenate([y, y[:0], y])._meta, sparse.COO)
      assert isinstance(np.stack([y, y])._meta, sparse.COO)
      assert isinstance(np.stack([y[:0], y[:0]])._meta, sparse.COO)
      assert isinstance(
          np.concatenate([y[:0], y[:0]])._meta, sparse.COO
      )
  
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 3 for calling a global function with example usage: test_metadata() without return types