code: def test_fallback_to_pickle():
      np = pytest.importorskip("numpy")
  
      d = 1
      L = dumps(d)
      assert b"__Pickled__" not in L[0]
      assert loads(L) == d
  
      d = np.int64(1)
      with captured_logger("distributed.protocol.core") as logger:
          L = dumps(d)
      assert "can not serialize 'numpy.int64'" in logger.getvalue()
      assert L[0].count(b"__Pickled__") == 1
      assert loads(L) == d
  
      d = {np.int64(1): {np.int64(2): "a"}, 3: ("b", "c"), 4: "d"}
      with captured_logger("distributed.protocol.core") as logger:
          L = dumps(d)
      assert "can not serialize 'numpy.int64'" in logger.getvalue()
      # Make sure that we pickle the individual ints, not the entire dict
      assert L[0].count(b"__Pickled__") == 2
      assert loads(L) == d
  
      d = {np.int64(1): {Serialize(2): "a"}, 3: ("b", "c"), 4: "d"}
      with captured_logger("distributed.protocol.core") as logger:
          L = dumps(d)
      assert "can not serialize 'numpy.int64'" in logger.getvalue()
      # Make sure that we still serialize and don't pickle indiscriminately
      assert L[0].count(b"__Pickled__") == 1
      assert L[0].count(b"__Serialized__") == 1
      assert loads(L) == {np.int64(1): {2: "a"}, 3: ("b", "c"), 4: "d"}
  
imports: from __future__ import annotations
  import sys
  import pytest
  from dask.sizeof import sizeof
  from distributed.compatibility import WINDOWS
  from distributed.protocol import dumps, loads, msgpack, to_serialize
  from distributed.protocol.cuda import cuda_deserialize, cuda_serialize
  from distributed.protocol.serialize import Pickled, Serialize, Serialized, ToPickle, dask_deserialize, dask_serialize, deserialize, serialize
  from distributed.utils import nbytes
  from distributed.utils_test import captured_logger
label_desc: Use image node_id 13 for calling a global function with example usage: test_fallback_to_pickle() without return types