def _remove_empty_events(sse):
    """
    Given a sequence of synchronous events (SSE) sse consisting of a pool of
    pixel positions and associated synchronous events (see below), returns a
    copy of sse where all empty events have been removed.

    sse must be provided as a dictionary of type

    .. centered:: {(i1, j1): S1, (i2, j2): S2, ..., (iK, jK): SK},

    where each i, j is an integer and each S is a set of neuron ids.
    (See also: extract_sse() that extracts SSEs from given spiketrains).

    Parameters
    ----------
    sse : dict
        a dictionary of pixel positions (i, j) as keys, and sets S of
        synchronous events as values (see above).

    Returns
    -------
    sse_new : dict
        a copy of sse where all empty events have been removed.
    """
    sse_new = sse.copy()
    for pixel, link in sse.items():
        if link == set([]):
            del sse_new[pixel]
    return sse_new
