<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _generate_filter_ngrams(self, data, min_size):
 """Returns the n-grams in `data` that do not contain any other n-gram in `data`. :param data: n-gram results data :type data: `pandas.DataFrame` :param min_size: minimum n-gram size in `data` :type min_size: `int` :rtype: `list` of `str` """

        max_size = data[constants.SIZE_FIELDNAME].max()
        kept_ngrams = list(data[data[constants.SIZE_FIELDNAME] == min_size][
            constants.NGRAM_FIELDNAME])
        for size in range(min_size+1, max_size+1):
            pattern = FilteredWitnessText.get_filter_ngrams_pattern(
                kept_ngrams)
            potential_ngrams = list(data[data[constants.SIZE_FIELDNAME] ==
                                         size][constants.NGRAM_FIELDNAME])
            kept_ngrams.extend([ngram for ngram in potential_ngrams if
                                pattern.search(ngram) is None])
        return kept_ngrams