def unregister(kind, listener):
    """Unregister a listener for a given event kind.

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

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