def register(kind, listener):
    """Register a listener for a given event kind.

    Parameters
    ----------
    kind : str
    listener : Listener
    """
    assert isinstance(listener, Listener)
    kind = _guard_kind(kind)
    _registered[kind].append(listener)
Register a listener for a given event kind.

    Parameters
    ----------
    kind : str
    listener : Listener
    
numba/core/event.py