code: def multi_future(children):
      """Wait for multiple asynchronous futures in parallel.
  
      This function is similar to `multi`, but does not support
      `YieldPoints <YieldPoint>`.
  
      .. versionadded:: 4.0
      """
      unfinished_children = set(children)
  
      future = Future()
      if not children:
          future_set_result_unless_cancelled(future, [])
  
      def callback(f):
          unfinished_children.remove(f)
          if not unfinished_children:
              result_list = []
              for f in children:
                  try:
                      result_list.append(f.result())
                  except Exception as e:
                      if future.done():
                          app_log.error(
                              "Multiple exceptions in yield list",
                              exc_info=True,
                          )
                      else:
                          future_set_exc_info(future, sys.exc_info())
              if not future.done():
                  future_set_result_unless_cancelled(
                      future, result_list
                  )
  
      listening = set()
      for f in children:
          if f not in listening:
              listening.add(f)
              future_add_done_callback(f, callback)
      return future
  
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 4 for calling a global function with example usage: multi_future(children) and returns: future