code: def test_list_corrector():
      corr = spelling.ListCorrector(_wordlist)
      typo = "reoction"
      sugs = list(corr.suggest(typo, maxdist=2))
      target = []
      for lev_dist in range(1, 3):
          # sugs will return suggest first ordered by levenshtein distance
          # then second order by dictionary order
          target += [
              w
              for w in _wordlist
              if levenshtein(typo, w) <= lev_dist and w not in target
          ]
      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 1 for calling a global function with example usage: test_list_corrector() without return types