<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):
 """Reset emulator. All registers and memory are reset. """

        self.__mem.reset()
        self.__cpu.reset()
        self.__tainter.reset()

        # Instructions pre and post handlers.
        self.__instr_handler_pre = None, None
        self.__instr_handler_post = None, None

        self.__set_default_handlers()