code: def _needs_update(self):
          'Returns whether the ProgressBar should redraw the line.'
  
          if self.poll_interval:
              delta = timeit.default_timer() - self._last_update_timer
              poll_status = delta > self.poll_interval.total_seconds()
          else:
              delta = 0
              poll_status = False
  
          # Do not update if value increment is not large enough to
          # add more bars to progressbar (according to current
          # terminal width)
          try:
              divisor = self.max_value / self.term_width  # float division
              if self.value // divisor == self.previous_value // divisor:
                  return poll_status or self.end_time
              else:
                  return True
          except Exception:
              # ignore any division errors
              pass
  
          return poll_status or self.end_timf _needs_update(self):
          'Returns whether the ProgressBar should redraw the line.'
  
          if self.poll_interval:
              delta = timeit.default_timer() - self._last_update_timer
              poll_status = delta > self.poll_interval.total_seconds()
          else:
              delta = 0
              poll_status = False
  
          # Do not update if value increment is not large enough to
          # add more bars to progressbar (according to current
          # terminal width)
          try:
              divisor = self.max_value / self.term_width  # float division
              if self.value // divisor == self.previous_value // divisor:
                  return poll_status or self.end_time
              else:
                  return True
          except Exception:
              # ignore any division errors
              pass
  
          return poll_status or self.end_time
docs: Returns whether the ProgressBar should redraw the line.