def call(self,  # pylint: disable=invalid-name
           last_byte_processed,
           total_size):
    """Prints an overwriting line to stderr describing the operation progress.

    Args:
      last_byte_processed: The last byte processed in the file. For file
                           components, this number should be in the range
                           [start_byte:start_byte + override_total_size].
      total_size: Total size of the ongoing operation.
    """
    if self._last_byte_written:
      return

    if self._override_total_size:
      total_size = self._override_total_size

    if total_size:
      total_size_string = '/%s' % MakeHumanReadable(total_size)
    else:
      total_size_string = ''
    # Use sys.stderr.write instead of self.logger.info so progress messages
    # output on a single continuously overwriting line.
    # TODO: Make this work with logging.Logger.
    self._status_queue.put('%s%s%s    \r' % (
        self._announce_text,
        MakeHumanReadable(last_byte_processed - self._start_byte),
        total_size_string))
    if total_size and last_byte_processed - self._start_byte == total_size:
      self._last_byte_written = True
      self._status_queue.put('\n')
dataset/ETHPy150Open GoogleCloudPlatform/gsutil/gslib/progress_callback.py/FileProgressCallbackHandler.call/original