code: def finish(self):
          'Puts the ProgressBar bar in the finished state.'
  
          self.finished = True
          self.update(self.maxval)
          self.fd.write('\n')
          if self.signal_set:
              signal.signal(signal.SIGWINCH, signal.SIG_DFL)
  
          if self.redirect_stderr:
              self._stderr.write(sys.stderr.getvalue())
              sys.stderr = self._stderr
  
          if self.redirect_stdout:
              self._stdout.write(sys.stdout.getvalue())
              sys.stdout = self._stdouf finish(self):
          'Puts the ProgressBar bar in the finished state.'
  
          self.finished = True
          self.update(self.maxval)
          self.fd.write('\n')
          if self.signal_set:
              signal.signal(signal.SIGWINCH, signal.SIG_DFL)
  
          if self.redirect_stderr:
              self._stderr.write(sys.stderr.getvalue())
              sys.stderr = self._stderr
  
          if self.redirect_stdout:
              self._stdout.write(sys.stdout.getvalue())
              sys.stdout = self._stdout
docs: Puts the ProgressBar bar in the finished state.