code: def test_minmax_field_length():
      st = RamStorage()
      schema = fields.Schema(t=fields.TEXT)
      ix = st.create_index(schema)
      least = 999999
      most = 0
      for _ in xrange(1, 200, 7):
          w = ix.writer()
          count = random.randint(1, 100)
          least = min(count, least)
          most = max(count, most)
          w.add_document(t=u(" ").join(["word"] * count))
          w.commit()
  
          with ix.reader() as r:
              assert r.min_field_length("t") == _discreet(least)
              assert r.max_field_length("t") == _discreet(most)
  
file_path: whoosh/tests/test_quality.py
imports: from __future__ import with_statement
  import random
  from whoosh import fields, matching, scoring
  from whoosh.compat import u, xrange
  from whoosh.filedb.filestore import RamStorage
  from whoosh.util.numeric import length_to_byte, byte_to_length
label_desc: Use image node_id 3 for calling a global function with example usage: test_minmax_field_length() without return types