code: def _bar(self, target_name, current, total):
          
          bar_len = 30
  
          if total is None:
              state = 0
              percent = "?% "
          else:
              total = int(total)
              state = int((100 * current) / total) if current < total else 100
              percent = str(state) + "% "
  
          if self._n_total > 1:
              num = "({}/{}): ".format(self._n_finished + 1, self._n_total)
          else:
              num = ""
  
          n_sh = int((state * bar_len) / 100)
          n_sp = bar_len - n_sh
          pbar = "[" + "#" * n_sh + " " * n_sp + "] "
  
          return num + pbar + percent + target_name
docs: Make a progress bar out of info, which looks like:
          (1/2): [########################################] 100% master.zip