code: def _add_history(self, redo_func, redo_kwargs, undo_func, undo_kwargs,
                       **kwargs):
          
          if not self.history_enabled:
              return
  
          param = HistoryParameter(self, redo_func, redo_kwargs,
                                   undo_func, undo_kwargs)
  
          metawargs = {'context': 'history',
                       'history': kwargs.get('history', self._default_label('hist', **{'context': 'history'}))}
  
          self._check_label(metawargs['history'])
  
          self._attach_params([param], **metawargs)
docs: Add a new log (undo/redoable) to this history context
  
          :parameter str redo_func: function to redo the action, must be a
              method of :class:`Bundle`
          :parameter dict redo_kwargs: kwargs to pass to the redo_func.  Each
              item must be serializable (float or str, not objects)
          :parameter str undo_func: function to undo the action, must be a
              method of :class:`Bundle`
          :parameter dict undo_kwargs: kwargs to pass to the undo_func.  Each
              item must be serializable (float or str, not objects)
          :parameter str history: label of the history parameter
          :raises ValueError: if the label for this history item is forbidden or
              already exists