<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _modify_event(self, event_name, method, func):
 """ Wrapper to call a list's method from one of the events """

        if event_name not in self.ALL_EVENTS:
            raise TypeError(('event_name ("%s") can only be one of the '
                             'following: %s') % (event_name,
                                                 repr(self.ALL_EVENTS)))
        if not isinstance(func, collections.Callable):
            raise TypeError(('func must be callable to be added as an '
                             'observer.'))
        getattr(self._events[event_name], method)(func)