code: def _download_file_from_url(
      url: str, path: str, progress_bar: bool
  ) -> None:
      with requests.get(url, stream=True) as req_stream:
          total_size_in_bytes = int(
              req_stream.headers.get("content-length", 0)
          )
          block_size = 1000 * 1000  # 1 MB
  
          download_progress_bar = None
          if progress_bar:
              download_progress_bar = tqdm(
                  desc="Downloading",
                  total=total_size_in_bytes,
                  unit="B",
                  unit_scale=True,
                  unit_divisor=1000,
              )
          with open(path, "wb") as f:
              for chunk in req_stream.iter_content(
                  chunk_size=block_size
              ):
                  if download_progress_bar:
                      download_progress_bar.update(len(chunk))
                  f.write(chunk)
          if download_progress_bar:
              download_progress_bar.close()
  
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 2 for calling a global function with example usage: _download_file_from_url(url, path, progress_bar) without return types