code: def _copy_future_state(source, dest):
      """Internal helper to copy state from another Future.
  
      The other Future may be a concurrent.futures.Future.
      """
      assert source.done()
      if dest.cancelled():
          return
      assert not dest.done()
      if source.cancelled():
          dest.cancel()
      else:
          exception = source.exception()
          if exception is not None:
              dest.set_exception(_convert_future_exc(exception))
          else:
              result = source.result()
              dest.set_result(result)
  
imports: import concurrent.futures
  import contextvars
  import logging
  import sys
  from types import GenericAlias
  from .None import base_futures
  from .None import events
  from .None import exceptions
  from .None import format_helpers
label_desc: Use image node_id 5 for calling a global function with example usage: _copy_future_state(source, dest) without return types