code: def _upload_file_to_url(
      url: str, path: str, progress_bar: bool
  ) -> None:
      if progress_bar:
          file_size = os.path.getsize(path)
          with open(path, "rb") as fd, tqdm(
              desc="Uploading",
              total=file_size,
              unit="B",
              unit_scale=True,
              unit_divisor=1000,
          ) as t:
              reader_wrapper = CallbackIOWrapper(t.update, fd, "read")
              response = requests.put(url, data=reader_wrapper)
              response.raise_for_status()
      else:
          with open(path, "rb") as fo:
              requests.put(url, data=fo)
  
file_path: pytorch-lightning/src/lightning/store/utils.py
imports: import os
  import requests
  from lightning_cloud.openapi import AuthServiceApi, ModelsStoreApi, ProjectsServiceApi
  from lightning_cloud.rest_client import create_swagger_client
  from tqdm import tqdm
  from tqdm.utils import CallbackIOWrapper
label_desc: Use image node_id 1 for calling a global function with example usage: _upload_file_to_url(url, path, progress_bar) without return types