code: def _download_progress_cb(blocknum, blocksize, totalsize):
      
      readsofar = blocknum * blocksize
      if totalsize > 0:
          percent = readsofar * 1e2 / totalsize
          msg = "\r%5.1f%% %*d / %d" % (
              percent, len(str(totalsize)), readsofar, totalsize)
          print(msg)
          if readsofar >= totalsize:  # near the end
              print("\n")
      else:  # total size is unknown
          print("read %d\n" % (readsofar,))
docs: Banana Banana