code: def test_add_field():
      schema = fields.Schema(a=fields.TEXT)
      with TempIndex(schema, "addfield") as ix:
          with ix.writer() as w:
              w.add_document(a="alfa bravo charlie")
          with ix.writer() as w:
              w.add_field("b", fields.ID(stored=True))
              w.add_field("c*", fields.ID(stored=True), glob=True)
              w.add_document(
                  a="delta echo foxtrot", b="india", cat="juliet"
              )
  
          with ix.searcher() as s:
              fs = s.document(b="india")
              assert fs == {"b": "india", "cat": "juliet"}
  
imports: from __future__ import with_statement
  import random, time, threading
  import pytest
  from whoosh import analysis, fields, query, writing
  from whoosh.compat import b, u, xrange, text_type
  from whoosh.filedb.filestore import RamStorage
  from whoosh.util.testing import TempIndex
label_desc: Use image node_id 12 for calling a global function with example usage: test_add_field() without return types