code: def upload_file(url, local_path, logger=None):
      if logger:
          logger.info(
              ("Trying to upload file {0} to " + "url {1}").format(
                  local_path, url
              )
          )
      tic = time.time()
      try:
          with open(local_path, "rb") as f:
              resp = requests.put(url, data=f)
      except Exception as exc:
          msg: str = "Upload {0} to {1} FAILED: {2}. Aborting.".format(
              local_path, url, exc
          )
          report_fatal(msg, logger)
  
      if resp.status_code != 200 and logger:
          msg: str = "Upload {0} to {1}: Response error {2}:{3}. Aborting.".format(
              local_path, url, resp.status_code, resp.reason
          )
          report_fatal(msg, logger)
  
      if logger:
          logger.debug(
              "File {0} upload to {1} done in {2} s".format(
                  local_path, url, time.time() - tic
              )
          )
  
file_path: studio/studio/storage/storage_util.py
imports: import os
  import requests
  import shutil
  import time
  import tarfile
  import tempfile
  from studio.artifacts import artifacts_tracker
  from studio.util import util
label_desc: Use image node_id 8 for calling a global function with example usage: upload_file(url, local_path, logger) without return types