code: def test_pinpoint():
      domain = u(
          "alfa bravo charlie delta echo foxtrot golf hotel india juliet "
          "kilo lima mike november oskar papa quebec romeo sierra tango"
      )
      schema = fields.Schema(text=fields.TEXT(stored=True, chars=True))
      ix = RamStorage().create_index(schema)
      w = ix.writer()
      w.add_document(text=domain)
      w.commit()
  
      assert ix.schema["text"].supports("characters")
      with ix.searcher() as s:
          r = s.search(query.Term("text", "juliet"), terms=True)
          hit = r[0]
          hi = highlight.Highlighter()
          hi.formatter = highlight.UppercaseFormatter()
  
          assert not hi.can_load_chars(r, "text")
          assert (
              hi.highlight_hit(hit, "text")
              == "golf hotel india JULIET kilo lima mike november"
          )
  
          hi.fragmenter = highlight.PinpointFragmenter()
          assert hi.can_load_chars(r, "text")
          assert (
              hi.highlight_hit(hit, "text")
              == "ot golf hotel india JULIET kilo lima mike nove"
          )
  
          hi.fragmenter.autotrim = True
          assert (
              hi.highlight_hit(hit, "text")
              == "golf hotel india JULIET kilo lima mike"
          )
  
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 13 for calling a global function with example usage: test_pinpoint() without return types