def _filter_tuples(diced_str, to_remove):
    """
    Returns *diced_str* with all of the tuples containing any elements of the
    *to_remove* iterable filtered out. This is used to drop search terms from
    the diced_str once they've been matched. For example:

    # start with the output of the _dice doctest
    >>> p = [('a', 'b', 'c'), ('a', 'b'), ('b', 'c'), ('a',), ('b',), ('c',)]

    >>> _filter_tuples(p, ("a"))
    [('b', 'c'), ('b',), ('c',)]

    >>> _filter_tuples(p, ("b", "c"))
    [('a',)]
    """

    # true if the tupl does not contain
    # any of the elements in *to_remove*
    def _func(tupl):
        for x in to_remove:
            if x in tupl:
                return False

        return True

    return filter(_func, diced_str)