code: def _check_cluster_and_client_loop(loop):
      # Setup simple cluster with one threaded worker.
      # Complex setup is not required here since we test only IO loop teardown.
      with LocalCluster(
          loop=loop,
          n_workers=1,
          dashboard_address=":0",
          processes=False,
      ) as cluster:
          with Client(cluster, loop=loop) as client:
              client.run(max, 1, 2)
  
file_path: distributed/distributed/tests/test_client_loop.py
imports: from __future__ import annotations
  import contextlib
  from distributed import Client, LocalCluster
  from distributed.utils import LoopRunner
label_desc: Use image node_id 2 for calling a global function with example usage: _check_cluster_and_client_loop(loop) without return types