code: def test_dumps_serialize_numpy(x):
      header, frames = serialize(x)
      if "compression" in header:
          frames = decompress(header, frames)
      for frame in frames:
          assert isinstance(frame, (bytes, memoryview))
      if x.dtype.char == "O" and any(
          isinstance(e, np.ndarray) for e in x.flat
      ):
          assert len(frames) > 1  # pickle protocol >= 5
      y = deserialize(header, frames)
  
      assert x.shape == y.shape
      assert x.dtype == y.dtype
      if x.flags.c_contiguous or x.flags.f_contiguous:
          assert x.strides == y.strides
  
      if x.dtype.char == "O":
          for e_x, e_y in zip(x.flat, y.flat):
              np.testing.assert_equal(e_x, e_y)
      else:
          np.testing.assert_equal(x, y)
  
imports: from __future__ import annotations
  from zlib import crc32
  import pytest
  from dask.utils import ensure_bytes, tmpfile
  from distributed.protocol import decompress, deserialize, dumps, loads, msgpack, serialize, to_serialize
  from distributed.protocol.compression import maybe_compress
  from distributed.protocol.numpy import itemsize
  from distributed.protocol.utils import BIG_BYTES_SHARD_SIZE
  from distributed.system import MEMORY_LIMIT
  from distributed.utils import nbytes
  from distributed.utils_test import gen_cluster
label_desc: Use image node_id 2 for calling a global function with example usage: test_dumps_serialize_numpy(x) without return types