code: def test_fieldwriter_two_terms():
      field = fields.TEXT()
      st, codec, seg = _make_codec()
  
      fw = codec.field_writer(st, seg)
      fw.start_field("text", field)
      fw.start_term(b("alfa"))
      fw.add(0, 2.0, b("test1"), 2)
      fw.add(1, 1.0, b("test2"), 1)
      fw.finish_term()
      fw.start_term(b("bravo"))
      fw.add(0, 3.0, b("test3"), 3)
      fw.add(2, 2.0, b("test4"), 2)
      fw.finish_term()
      fw.finish_field()
      fw.close()
  
      tr = codec.terms_reader(st, seg)
      assert ("text", b("alfa")) in tr
      ti = tr.term_info("text", b("alfa"))
      assert ti.weight() == 3.0
      assert ti.doc_frequency() == 2
      assert ti.min_length() == 1
      assert ti.max_length() == 2
      assert ti.max_weight() == 2.0
      assert ti.min_id() == 0
      assert ti.max_id() == 1
      assert ("text", b("bravo")) in tr
      ti = tr.term_info("text", b("bravo"))
      assert ti.weight() == 5.0
      assert ti.doc_frequency() == 2
      assert ti.min_length() == 2
      assert ti.max_length() == 3
      assert ti.max_weight() == 3.0
      assert ti.min_id() == 0
      assert ti.max_id() == 2
  
      m = tr.matcher("text", b("bravo"), field.format)
      assert list(m.all_ids()) == [0, 2]
  
imports: from __future__ import with_statement
  import random
  from array import array
  import pytest
  from whoosh import analysis, fields, formats, query
  from whoosh.compat import u, b, text_type
  from whoosh.compat import array_tobytes, xrange
  from whoosh.codec import default_codec
  from whoosh.filedb.filestore import RamStorage
  from whoosh.util.testing import TempStorage
label_desc: Use image node_id 13 for calling a global function with example usage: test_fieldwriter_two_terms() without return types