code: def _progress_bar(count, total):
      """Report download progress. Credit:
      https://stackoverflow.com/questions/3173320/text-progress-bar-in-the-console/27871113
      """
      bar_len = 60
      filled_len = int(round(bar_len * count / float(total)))
      percents = round(100.0 * count / float(total), 1)
      bar = "=" * filled_len + "-" * (bar_len - filled_len)
      sys.stdout.write(
          "  [{}] {}% of {:.1f}MB file  \r".format(
              bar, percents, total / 1024 / 1024
          )
      )
      sys.stdout.flush()
      if count >= total:
          sys.stdout.write("\n")
  
file_path: pycls/pycls/core/io.py
imports: import logging
  import os
  import re
  import sys
  from urllib import request
  from iopath.common.file_io import PathManagerFactory
label_desc: Use image node_id 2 for calling a global function with example usage: _progress_bar(count, total) without return types