code: def test_basic(client):
      df = dd.demo.make_timeseries(freq="15D", partition_freq="30D")
      df["name"] = df["name"].astype("string[python]")
      with dask.config.set({"dataframe.shuffle.method": "p2p"}):
          p2p_shuffled = df.shuffle("id")
  
      (opt,) = dask.optimize(p2p_shuffled)
      assert isinstance(hlg_layer_topological(opt.dask, 0), Blockwise)
      # blockwise -> barrier -> unpack -> drop_by_shallow_copy
  
      with dask.config.set({"dataframe.shuffle.method": "tasks"}):
          tasks_shuffled = df.shuffle("id")
      dd.utils.assert_eq(p2p_shuffled, tasks_shuffled, scheduler=client)
  
file_path: distributed/distributed/shuffle/tests/test_graph.py
imports: from __future__ import annotations
  import asyncio
  import pytest
  import dask
  import dask.dataframe
  from dask.blockwise import Blockwise
  from dask.utils_test import hlg_layer_topological
  from distributed.utils_test import gen_cluster
label_desc: Use image node_id 1 for calling a global function with example usage: test_basic(client) without return types