def remove_ids(g, matches):
    """Given the output of ``match_ids(_parallel)``, returns a list of edges to add,
    and vertices to remove."""
    etab = dict()
    rem = []
    for m in matches:
        rem.append(m[0])
        e = (m[1], m[2]) if m[1] < m[2] else (m[2], m[1])
        if not e in etab:
            etab[e] = [0, 0]
        etab[e][m[3] - 1] += 1
    return etab, rem, [], False
