code: def test_reader_corrector():
      schema = fields.Schema(text=fields.TEXT())
      with TempIndex(schema) as ix:
          with ix.writer() as w:
              w.add_document(text="render zorro kaori postal")
              w.add_document(text="reader zebra koala pastry")
              w.add_document(text="leader libra oola paster")
              w.add_document(text="feeder lorry zoala baster")
  
          with ix.reader() as r:
              sp = spelling.ReaderCorrector(r, "text", schema["text"])
              assert sp.suggest("koala", maxdist=1) == [
                  "koala",
                  "zoala",
              ]
  
              target = ["kaori", "koala", "oola"]
              sugs = sp.suggest("kaola", maxdist=2)
              assert sugs == target
  
imports: from __future__ import with_statement
  import gzip
  from whoosh import analysis, fields, highlight, query, spelling
  from whoosh.compat import u
  from whoosh.qparser import QueryParser
  from whoosh.support.levenshtein import levenshtein
  from whoosh.util.testing import TempIndex
label_desc: Use image node_id 3 for calling a global function with example usage: test_reader_corrector() without return types