code: def setup_cluster(dask_worker_devices):
      dask_worker_devices_str = ",".join(
          [str(i) for i in dask_worker_devices]
      )
      from dask_cuda import LocalCUDACluster
  
      cluster = LocalCUDACluster(
          protocol="tcp",
          CUDA_VISIBLE_DEVICES=dask_worker_devices_str,
          rmm_pool_size="25GB",
      )
  
      client = Client(cluster)
      client.wait_for_workers(n_workers=len(dask_worker_devices))
      client.run(enable_spilling)
      print("Dask Cluster Setup Complete")
      del client
      return cluster
  
file_path: cugraph/python/cugraph-dgl/examples/multi_trainer_MG_example/workflow.py
imports: import dgl
  import torch
  import time
  from distributed import Client, Event
  import tempfile
  from cugraph.dask.comms import comms
label_desc: Use image node_id 2 for calling a global function with example usage: setup_cluster(dask_worker_devices) and returns: cluster