code: def test_highlight_ngrams():
      schema = fields.Schema(text=fields.NGRAMWORDS(stored=True))
      ix = RamStorage().create_index(schema)
      with ix.writer() as w:
          w.add_document(
              text=u("Multiplication and subtraction are good")
          )
  
      with ix.searcher() as s:
          qp = qparser.QueryParser("text", ix.schema)
          q = qp.parse(u("multiplication"))
          r = s.search(q)
          assert r.scored_length() == 1
  
          r.fragmenter = highlight.SentenceFragmenter()
          r.formatter = highlight.UppercaseFormatter()
          snippet = r[0].highlights("text")
          assert snippet == "MULTIPLICATIon and subtracTION are good"
  
imports: from __future__ import with_statement
  import pytest
  from whoosh import analysis, highlight, fields, qparser, query
  from whoosh.compat import u
  from whoosh.filedb.filestore import RamStorage
  from whoosh.util.testing import TempIndex
label_desc: Use image node_id 15 for calling a global function with example usage: test_highlight_ngrams() without return types