code: def test_nonexclusive_read():
      schema = fields.Schema(text=fields.TEXT)
      with TempIndex(schema, "readlock") as ix:
          for num in u("one two three four five").split():
              w = ix.writer()
              w.add_document(text=u("Test document %s") % num)
              w.commit(merge=False)
  
          def fn():
              for _ in xrange(5):
                  r = ix.reader()
                  assert list(r.field_terms("text")) == [
                      "document",
                      "five",
                      "four",
                      "one",
                      "test",
                      "three",
                      "two",
                  ]
                  r.close()
  
          ths = [threading.Thread(target=fn) for _ in xrange(5)]
          for th in ths:
              th.start()
          for th in ths:
              th.join()
  
imports: from __future__ import with_statement
  import random, threading, time
  import pytest
  from whoosh import fields, formats, reading
  from whoosh.compat import b, u, xrange
  from whoosh.reading import SegmentReader
  from whoosh.filedb.filestore import RamStorage
  from whoosh.util.testing import TempIndex
label_desc: Use image node_id 14 for calling a global function with example usage: test_nonexclusive_read() without return types