code: def reset(self, mode=InputMode.INSERT):
          
          # Go back to insert mode.
          self.input_mode = mode
  
          self.waiting_for_digraph = False
          self.operator_func = None
          self.operator_arg = None
docs: Reset state, go back to the given mode. INSERT by default.