code: def persist_across_workers(client, objects, workers=None):
      """
      Calls persist on the 'objects' ensuring they are spread
      across the workers on 'workers'.
  
      Parameters
      ----------
      client : dask.distributed.Client
      objects : list
          Dask distributed objects to be persisted
      workers : list or None
          List of workers across which to persist objects
          If None, then all workers attached to 'client' will be used
      """
      if workers is None:
          workers = client.has_what().keys()  # Default to all workers
  
      if check_min_dask_version("2020.12.0"):
          with dask.annotate(workers=set(workers)):
              return client.persist(objects)
  
      else:
          return client.persist(
              objects, workers={o: workers for o in objects}
          )
  
imports: from threading import Lock
  from asyncio import InvalidStateError
  from cuml.internals.import_utils import check_min_dask_version
  from cuml.common import device_of_gpu_matrix
  from dask.distributed import default_client, wait
  import time
  import random
  import dask
  import logging
  import os
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 8 for calling a global function with example usage: persist_across_workers(client, objects, workers) and returns: client, client