code: def enter_diff_mode(self, context_model=None):
          
          assert not self.diff_mode
          self.diff_mode = True
  
          if context_model is None:
              self.diff_from_source = True
              self.diff_context_model = self.context_model.copy()
          else:
              self.diff_from_source = False
              self.diff_context_model = context_model
  
          self.clear()
          self.setColumnCount(5)
          self.refresh()
docs: Enter diff mode.
  
          Args:
              context_model (`ContextModel`): Context to diff against. If None, a
              copy of the current context is used.