def unique_filter(matches):
    """
    Iterate over matches and yield unique matches.
    """
    uniques = set()
    for key, match, line, lineno in matches:
        if (key, match) in uniques:
            continue
        uniques.add((key, match))
        yield key, match, line, lineno
