code: def progress_bar(progress, width=40, length=None, last_progress=None):
      """Print progress bar to sys.stdout
      Parameters
      ----------
      progress : `float`
          Reached progress between 0 (just started) and 1 (finished)
      width : `int`
          Total width of the progress bar
      length : `int`
          Size in bytes of the downloaded file
      """
      if length:
          size = "(%s)" % convert_size(length)
      else:
          size = ""
  
      n_bars = int(progress * width)
      if last_progress is not None and n_bars == int(
          last_progress * width
      ):
          return
  
      bar = "[%s%s]" % ("=" * n_bars, " " * (width - n_bars))
      print(
          "\r%s %s %2d%%" % (size, bar, progress * 100),
          flush=True,
          end="",
      )
      if progress == 1:
          print()
  
file_path: tick/tick/dataset/download_helper.py
imports: import logging
  from urllib.request import urlopen
  import os
  import shutil
  import numpy
  from sklearn.datasets import load_svmlight_file
  import math
  import warnings
label_desc: Use image node_id 9 for calling a global function with example usage: progress_bar(progress, width, length, last_progress) without return types