def reg_event_handler(self, event, handler):
        self.events[event] = [] if event not in self.events else self.events[
            event]
        self.events[event].append(handler)
dataset/ETHPy150Open SpockBotMC/SpockBot/tests/plugins/helpers/test_chat.py/PluginLoaderMock.reg_event_handler/original