docs: def update(self, value=None):
          'Updates the ProgressBar to a new value.'
  
          if value is not None and value is not UnknownLength:
              if (self.maxval is not UnknownLength
                      and not 0 <= value <= self.maxval
                      and not value < self.currval):
  
                  raise ValueError('Value out of range')
  
              self.currval = value
  
          if self.start_time is None:
              self.start()
              self.update(value)
          if not self._need_update():
              return
  
          if self.redirect_stderr and sys.stderr.tell():
              self.fd.write('\r' + ' ' * self.term_width + '\r')
              self._stderr.write(sys.stderr.getvalue())
              self._stderr.flush()
              sys.stderr = StringIO()
  
          if self.redirect_stdout and sys.stdout.tell():
              self.fd.write('\r' + ' ' * self.term_width + '\r')
              self._stdout.write(sys.stdout.getvalue())
              self._stdout.flush()
              sys.stdout = StringIO()
  
          now = time.time()
          self.seconds_elapsed = now - self.start_time
          self.next_update = self.currval + self.update_interval
          self.fd.write('\r' + self._format_line())
          self.last_update_time = now