code: def update(self, value=None):
          
  
          # Update self.value
          if value is None:
              value = self._current_value + 1
          self._current_value = value
  
          # Choose the appropriate environment
          if self._ipython_widget:
              try:
                  self._update_ipython_widget(value)
              except RuntimeError:
                  pass
          else:
              self._update_console(value)
docs: Update progress bar via the console or notebook accordingly.