code: def update(self, value):
          "Updates the progress bar to a new value."
          if value <= 0.1:
              value = 0
          assert 0 <= value <= self.maxval
          self.currval = value
          if not self._need_update() or self.finished:
              return
          if not self.start_time:
              self.start_time = time.time()
          self.seconds_elapsed = time.time() - self.start_time
          self.prev_percentage = self.percentage()
          if value != self.maxval:
              self.fd.write(self._format_line() + '\r')
          else:
              self.finished = True
              self.fd.write(self._format_line() + '\n'f update(self, value):
          "Updates the progress bar to a new value."
          if value <= 0.1:
              value = 0
          assert 0 <= value <= self.maxval
          self.currval = value
          if not self._need_update() or self.finished:
              return
          if not self.start_time:
              self.start_time = time.time()
          self.seconds_elapsed = time.time() - self.start_time
          self.prev_percentage = self.percentage()
          if value != self.maxval:
              self.fd.write(self._format_line() + '\r')
          else:
              self.finished = True
              self.fd.write(self._format_line() + '\n')
docs: Updates the progress bar to a new value.