code: def test_workflow_easy():
      schema = fields.Schema(
          id=fields.ID(stored=True), title=fields.TEXT(stored=True)
      )
      ix = RamStorage().create_index(schema)
  
      w = ix.writer()
      w.add_document(id=u("1"), title=u("The man who wasn't there"))
      w.add_document(
          id=u("2"), title=u("The dog who barked at midnight")
      )
      w.add_document(id=u("3"), title=u("The invisible man"))
      w.add_document(
          id=u("4"), title=u("The girl with the dragon tattoo")
      )
      w.add_document(id=u("5"), title=u("The woman who disappeared"))
      w.commit()
  
      with ix.searcher() as s:
          # Parse the user query
          parser = qparser.QueryParser("title", schema=ix.schema)
          q = parser.parse(u("man"))
          r = s.search(q, terms=True)
          assert len(r) == 2
  
          r.fragmenter = highlight.WholeFragmenter()
          r.formatter = highlight.UppercaseFormatter()
          outputs = [hit.highlights("title") for hit in r]
          assert outputs == [
              "The invisible MAN",
              "The MAN who wasn't there",
          ]
  
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 9 for calling a global function with example usage: test_workflow_easy() without return types