code: def _complete_futures(futures_dict, file):
      """
      Waits for the completion of all the futures in the given dictionary and returns
      a tuple of two dictionaries. The first dictionary contains the results of the
      futures (unordered) and the second contains the errors (unordered) that occurred
      during the execution of the futures.
      """
      results = {}
      errors = {}
  
      with ArtifactProgressBar.chunks(
          os.path.getsize(file),
          f"Uploading {file}",
          MLFLOW_MULTIPART_UPLOAD_CHUNK_SIZE.get(),
      ) as pbar:
          for future in as_completed(futures_dict):
              key = futures_dict[future]
              try:
                  results[key] = future.result()
                  pbar.update()
              except Exception as e:
                  errors[key] = repr(e)
  
      return results, errors
  
imports: import logging
  import math
  import os
  import posixpath
  from abc import abstractmethod
  from collections import namedtuple
  from concurrent.futures import as_completed
  from mlflow.environment_variables import MLFLOW_ENABLE_ARTIFACTS_PROGRESS_BAR, MLFLOW_ENABLE_MULTIPART_DOWNLOAD, MLFLOW_MULTIPART_DOWNLOAD_CHUNK_SIZE, MLFLOW_MULTIPART_UPLOAD_CHUNK_SIZE, MLFLOW_MULTIPART_UPLOAD_MINIMUM_FILE_SIZE
  from mlflow.exceptions import MlflowException
  from mlflow.store.artifact.artifact_repo import ArtifactRepository
  from mlflow.utils import chunk_list
  from mlflow.utils.file_utils import ArtifactProgressBar, download_chunk_retries, parallelized_download_file_using_http_uri, relative_path_to_artifact_path, remove_on_error
  from mlflow.utils.uri import is_fuse_or_uc_volumes_uri
label_desc: Use image node_id 2 for calling a global function with example usage: _complete_futures(futures_dict, file) and returns: results,  errors