code: def future_add_done_callback(future, callback):
      """Arrange to call ``callback`` when ``future`` is complete.
  
      ``callback`` is invoked with one argument, the ``future``.
  
      If ``future`` is already done, ``callback`` is invoked immediately.
      This may differ from the behavior of ``Future.add_done_callback``,
      which makes no such guarantee.
  
      .. versionadded:: 5.0
      """
      if future.done():
          callback(future)
      else:
          future.add_done_callback(callback)
  
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 3 for calling a global function with example usage: future_add_done_callback(future, callback) without return types