code: def test_keyterms_from_text(model=classify.Bo2Model):
      ix = create_index()
      with ix.searcher() as s:
          keys = list(
              s.key_terms_from_text("content", text, model=model)
          )
          assert set([t[0] for t in keys]) == set(
              ["particles", "velocity", "field"]
          )
          keys = list(s.key_terms_from_text("extra", text, model=model))
          assert keys == []
  
file_path: whoosh/tests/test_classify.py
imports: from __future__ import with_statement
  from whoosh import analysis, classify, fields, formats, query, reading
  from whoosh.compat import u, text_type
  from whoosh.filedb.filestore import RamStorage
  from whoosh.util.testing import TempIndex
label_desc: Use image node_id 4 for calling a global function with example usage: test_keyterms_from_text(model) without return types