code: def has_near_match_substitutions_ngrams(subsequence, sequence,
                                          max_substitutions):
      
      _check_arguments(subsequence, sequence, max_substitutions)
  
      for match in _find_near_matches_substitutions_ngrams(subsequence, sequence,
                                                           max_substitutions):
          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 number of character substitutions must be less than max_substitutions
      * no deletions or insertions are allowed