def raiseEvent(event, *args, **kwargs):
    """Raise a specific event

    Any additional keyword argument will be passed to registered
    CALLBACKS.

    :param event: the event to raise
    """
    if event not in EVENTS or event not in CALLBACKS:
        return 0
    for callback in CALLBACKS[event].values():
        callback(*args, **kwargs)
    return 1
dataset/ETHPy150Open tonioo/modoboa/modoboa/lib/events.py/raiseEvent/original