code: def get_file_with_progress_bar(
      model_url: str, file_path: str
  ) -> None:
      """Download file with a progress bar.
  
      Source: https://stackoverflow.com/a/37573701
  
      Args:
          model_url: URL from which to downloaded file.
          file_path: Location at which to save file.
  
      Raises:
          IOError: If size of downloaded file differs from that in remote's ``content-length`` header.
  
      Returns:
          None
      """
      mk_dirs_for_file(file_path=file_path)
      req_obj = requests.get(url=model_url, stream=True)
      total_size = int(req_obj.headers.get("content-length", 0))
      block_size = 1024  # 1 Kibibyte
      progress_bar = tqdm(total=total_size, unit="iB", unit_scale=True)
      with open(file_path, "wb") as file_open:
          for data in req_obj.iter_content(block_size):
              progress_bar.update(len(data))
              file_open.write(data)
      progress_bar.close()
      if total_size != 0 and progress_bar.n != total_size:
          raise IOError(
              f"Expected downloaded file to be of size '{total_size}' however it is in fact '{progress_bar.n}'."
          )
  
imports: import os
  import sys
  from contextlib import contextmanager
  from enum import EnumMeta, IntEnum
  from typing import Any, Dict, List, Optional, Union
  import requests
  from tqdm import tqdm
label_desc: Use image node_id 8 for calling a global function with example usage: get_file_with_progress_bar(model_url, file_path) without return types