code: def test_closed_searcher():
      from whoosh.reading import ReaderClosed
  
      schema = fields.Schema(
          key=fields.KEYWORD(stored=True, sortable=True)
      )
  
      with TempStorage() as st:
          ix = st.create_index(schema)
          with ix.writer() as w:
              w.add_document(key="alfa")
              w.add_document(key="bravo")
              w.add_document(key="charlie")
              w.add_document(key="delta")
              w.add_document(key="echo")
  
          s = ix.searcher()
          r = s.search(query.TermRange("key", "b", "d"))
          s.close()
          assert s.is_closed
          with pytest.raises(ReaderClosed):
              assert r[0]["key"] == "bravo"
          with pytest.raises(ReaderClosed):
              s.reader().column_reader("key")
          with pytest.raises(ReaderClosed):
              s.suggest("key", "brovo")
  
          s = ix.searcher()
          r = s.search(query.TermRange("key", "b", "d"))
          assert r[0]
          assert r[0]["key"] == "bravo"
          c = s.reader().column_reader("key")
          assert c[1] == "bravo"
          assert s.suggest("key", "brovo") == ["bravo"]
  
imports: from __future__ import with_statement
  import pytest
  from whoosh import analysis, fields, formats, highlight, qparser, query
  from whoosh.codec.whoosh3 import W3Codec
  from whoosh.compat import u, xrange, text_type, permutations
  from whoosh.filedb.filestore import RamStorage
  from whoosh.util.testing import TempStorage, TempIndex
label_desc: Use image node_id 22 for calling a global function with example usage: test_closed_searcher() without return types