code: def test_serialize_deserialize_sparse():
      from numpy.testing import assert_allclose
  
      x = np.random.random((2, 3, 4, 5))
      x[x < 0.8] = 0
  
      y = sparse.COO(x)
      header, frames = serialize(y)
      assert "sparse" in header["type"]
      z = deserialize(*serialize(y))
  
      assert_allclose(y.data, z.data)
      assert_allclose(y.coords, z.coords)
      assert_allclose(y.todense(), z.todense())
  
imports: from __future__ import annotations
  import pytest
  from distributed.protocol import deserialize, serialize
label_desc: Use image node_id 1 for calling a global function with example usage: test_serialize_deserialize_sparse() without return types