docs: def get_filter_ngrams_pattern(filter_ngrams):
          """Returns a compiled regular expression matching on any of the
          n-grams in `filter_ngrams`.
  
          :param filter_ngrams: n-grams to use in regular expression
          :type filter_ngrams: `list` of `str`
          :rtype: `_sre.SRE_Pattern`
  
          """
          return re.compile('|'.join([re.escape(ngram) for ngram in
                                      filter_ngrams]))