def add_event_handler(self, name, func):
        if name not in EventSource.handlers:
            raise KeyError('unknown event "{}"'.format(name))
        if EventSource.handlers[name] not in func:
            EventSource.handlers[name].append(func)
dataset/ETHPy150Open guillermooo/dart-sublime-bundle/lib/event.py/EventSource.add_event_handler/swapped operands of `not in`