code: def has_near_match_generic_ngrams(subsequence, sequence, search_params):
      
      if not subsequence:
          raise ValueError('Given subsequence is empty!')
  
      for match in _find_near_matches_generic_ngrams(subsequence, sequence, search_params):
          return True
      return False
docs: search for near-matches of subsequence in sequence
  
      This searches for near-matches, where the nearly-matching parts of the
      sequence must meet the following limitations (relative to the subsequence):
  
      * the maximum allowed number of character substitutions
      * the maximum allowed number of new characters inserted
      * and the maximum allowed number of character deletions
      * the total number of substitutions, insertions and deletions