code: def wait_for_futures(self):
          
          [future for future in futures.as_completed(self.futures)]
          self.futures = []
docs: Wait for all futures to complete. This should be done at the end of an
          an invocation.