code: def download_with_progress(url, chunk_size, **progress_kwargs):
      """
      Download streaming data from a URL, printing progress information to the
      terminal.
  
      Parameters
      ----------
      url : str
          A URL that can be understood by ``requests.get``.
      chunk_size : int
          Number of bytes to read at a time from requests.
      **progress_kwargs
          Forwarded to click.progressbar.
  
      Returns
      -------
      data : BytesIO
          A BytesIO containing the downloaded data.
      """
      resp = requests.get(url, stream=True)
      resp.raise_for_status()
  
      total_size = int(resp.headers["content-length"])
      data = BytesIO()
      with progressbar(length=total_size, **progress_kwargs) as pbar:
          for chunk in resp.iter_content(chunk_size=chunk_size):
              data.write(chunk)
              pbar.update(len(chunk))
  
      data.seek(0)
      return data
  
imports: from io import BytesIO
  import tarfile
  from zipfile import ZipFile
  from click import progressbar
  from logbook import Logger
  import pandas
  import requests
  from six.moves.urllib.parse import urlencode
  from six import iteritems
  from trading_calendars import register_calendar_alias
  from .None import core
  import numpy
label_desc: Use image node_id 9 for calling a global function with example usage: download_with_progress(url, chunk_size) and returns: data