code: def wait_for_processes(processes, size, progress_queue, watcher, item):
      
      while size > 0:
          progress_type, value = progress_queue.get()
          if progress_type == ProgressQueue.PROCESSED:
              chunk_size = value
              watcher.transferring_item(item, increment_amt=chunk_size)
              size -= chunk_size
          elif progress_type == ProgressQueue.START_WAITING:
              watcher.start_waiting()
          elif progress_type == ProgressQueue.DONE_WAITING:
              watcher.done_waiting()
          else:
              error_message = value
              for process in processes:
                  process.terminate()
              raise ValueError(error_message)
      for process in processes:
          process.join()
docs: Watch progress queue for errors or progress.
      Cleanup processes on error or success.
      :param processes: [Process]: processes we are waiting to finish downloading a file
      :param size: int: how many values we expect to be processed by processes
      :param progress_queue: ProgressQueue: queue which will receive tuples of progress or error
      :param watcher: ProgressPrinter: we notify of our progress:
      :param item: object: RemoteFile/LocalFile we are transferring.