def unique_bugs(generator):
    """ Remove duplicates from bug stream """
    state = set()
    for item in generator:
        if item not in state:
            state.add(item)
            yield item
