def _modify_event(self, event_name, method, func):
if event_name not in self.ALL_EVENTS:<EOL><INDENT>raise TypeError(('<STR_LIT>'<EOL>'<STR_LIT>') % (event_name,<EOL>repr(self.ALL_EVENTS)))<EOL><DEDENT>if not isinstance(func, collections.Callable):<EOL><INDENT>raise TypeError(('<STR_LIT>'<EOL>'<STR_LIT>'))<EOL><DEDENT>getattr(self._events[event_name], method)(func)<EOL>
Wrapper to call a list's method from one of the events