code: def test_pack_data():
      data = {"x": 1}
      assert pack_data(("x", "y"), data) == (1, "y")
      assert pack_data({"a": "x", "b": "y"}, data) == {"a": 1, "b": "y"}
      assert pack_data({"a": ["x"], "b": "y"}, data) == {
          "a": [1],
          "b": "y",
      }
  
imports: from __future__ import annotations
  import asyncio
  import random
  from unittest import mock
  import pytest
  from dask.optimization import SubgraphCallable
  from distributed import wait
  from distributed.compatibility import asyncio_run
  from distributed.config import get_loop_factory
  from distributed.core import ConnectionPool, Status
  from distributed.utils_comm import WrappedKey, gather_from_workers, pack_data, retry, subs_multiple, unpack_remotedata
  from distributed.utils_test import BarrierGetData, BrokenComm, gen_cluster, inc
label_desc: Use image node_id 1 for calling a global function with example usage: test_pack_data() without return types