code: def future_set_exc_info(future, exc_info):
      """Set the given ``exc_info`` as the `Future`'s exception.
  
      Understands both `asyncio.Future` and Tornado's extensions to
      enable better tracebacks on Python 2.
  
      .. versionadded:: 5.0
      """
      if hasattr(future, "set_exc_info"):
          # Tornado's Future
          future.set_exc_info(exc_info)
      else:
          # asyncio.Future
          future.set_exception(exc_info[1])
  
file_path: ipyparallel/ipyparallel/client/futures.py
imports: import sys
  from concurrent.futures import Future
  from threading import Event
  from tornado.log import app_log
label_desc: Use image node_id 2 for calling a global function with example usage: future_set_exc_info(future, exc_info) without return types