code: def combine_futures(*futures):
      
      expected = len(futures)
      results = []
      completed = AtomicInteger()
      combined = Future()
  
      def done(f):
          if not combined.done():
              if f.is_success():  # TODO: ensure ordering of results as original list
                  results.append(f.result())
                  if completed.get_and_increment() + 1 == expected:
                      combined.set_result(results)
              else:
                  combined.set_exception(f.exception(), f.traceback())
  
      for future in futures:
          future.add_done_callback(done)
  
      return combined
docs: Combines set of Futures.
  
      :param futures: (Futures), Futures to be combined.
      :return: Result of the combination.