code: def _cascade_future(future, cf_future):
      """
      Coroutine that waits on Dask future, then transmits its outcome to
      cf_future.
      """
      result = yield future._result(raiseit=False)
      status = future.status
      if status == "finished":
          cf_future.set_result(result)
      elif status == "cancelled":
          cf_future.cancel()
          # Necessary for wait() and as_completed() to wake up
          cf_future.set_running_or_notify_cancel()
      else:
          try:
              typ, exc, tb = result
              raise exc.with_traceback(tb)
          except BaseException as exc:
              cf_future.set_exception(exc)
  
file_path: distributed/distributed/cfexecutor.py
imports: from __future__ import annotations
  import concurrent.futures
  import weakref
  from tlz import merge
  from tornado import gen
  from dask.utils import parse_timedelta
  from distributed.metrics import time
  from distributed.utils import TimeoutError, sync
label_desc: Use image node_id 1 for calling a global function with example usage: _cascade_future(future, cf_future) without return types