def _modify_event(self, event_name, method, func):
        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)
Tests that the given Python_code will turn into the specified JavaScript and visa versa in a Jiphy.
dataset/ETHPy150Open jeffh/sniffer/sniffer/scanner/base.py/BaseScanner._modify_event--crossover with--dataset/ETHPy150Open timothycrosley/jiphy/test_jiphy.py/two_way_conversion_test