docs: def update_progress_bar(
          go, optext, start, total_files, files_sofar, total_bytes,
          bytes_sofar, stdin_upload=False):
      # type: (blobxfer.models.options.General, str, datetime.datetime, int,
      #        int, int, int, bool) -> None
      """Update the progress bar
      :param blobxfer.models.options.General go: general options
      :param str optext: operation prefix text
      :param datetime.datetime start: start time
      :param int total_files: total number of files
      :param int files_sofar: files transfered so far
      :param int total_bytes: total number of bytes
      :param int bytes_sofar: bytes transferred so far
      :param bool stdin_upload: stdin upload
      """
      if (go.quiet or not go.progress_bar or
              blobxfer.util.is_none_or_empty(go.log_file) or
              start is None):
          return
      diff = (blobxfer.util.datetime_now() - start).total_seconds()
      if diff <= 0:
          # arbitrarily give a small delta
          diff = 1e-9
      if total_bytes is None or total_bytes == 0 or bytes_sofar > total_bytes:
          done = 0
      else:
          done = float(bytes_sofar) / total_bytes
      rate = bytes_sofar / blobxfer.util.MEGABYTE / diff
      if optext == 'synccopy':
          rtext = 'sync-copied'
      else:
          rtext = optext + 'ed'
      if total_files is None:
          fprog = 'n/a'
      else:
          fprog = '{}/{}'.format(files_sofar, total_files)
      if stdin_upload:
          sys.stdout.write(
              ('\r{0} progress: [{1:30s}]   n/a % {2:12.3f} MiB/sec, '
               '{3} {4}').format(
                   optext, '>' * int(total_bytes % 30), rate, fprog, rtext)
          )
      else:
          sys.stdout.write(
              ('\r{0} progress: [{1:30s}] {2:.2f}% {3:12.3f} MiB/sec, '
               '{4} {5}').format(
                   optext, '>' * int(done * 30), done * 100, rate, fprog, rtext)
          )
      if files_sofar == total_files:
          sys.stdout.write('\n')
      sys.stdout.flush()