<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def reset(self, mode=InputMode.INSERT):
 """ Reset state, go back to the given mode. INSERT by default. """

        # Go back to insert mode.
        self.input_mode = mode

        self.waiting_for_digraph = False
        self.operator_func = None
        self.operator_arg = None