def trigram_filter(candidates, trigrams):
    """Remove unlikely trigrams from permutations

    Args:
        candidates (set): perms in cv map
        trigrams (list): least likely trigrams

    Returns:
        (set): permutations without trigrams
    """
    filtered_set = set()
    for candidate in candidates:
        for trigram in trigrams:
            if trigram.lower() in candidate:
                filtered_set.add(candidate)
    trigrams_filtered = candidates - filtered_set
    print(f'# choices after trigram_filter = {len(trigrams_filtered)}')
    return trigrams_filtered