code: def test_many_lengths():
      domain = u("alfa bravo charlie delta echo").split()
      schema = fields.Schema(text=fields.TEXT)
      ix = RamStorage().create_index(schema)
      w = ix.writer()
      for i, word in enumerate(domain):
          length = (i + 1) ** 6
          w.add_document(text=" ".join(word for _ in xrange(length)))
      w.commit()
  
      s = ix.searcher()
      for i, word in enumerate(domain):
          target = byte_to_length(length_to_byte((i + 1) ** 6))
          ti = s.term_info("text", word)
          assert ti.min_length() == target
          assert ti.max_length() == target
  
imports: from __future__ import with_statement
  import random
  from collections import defaultdict
  from datetime import datetime
  import pytest
  from whoosh import analysis, fields, index, qparser, query, __version__
  from whoosh.compat import b, u, xrange, text_type, permutations
  from whoosh.filedb.filestore import RamStorage
  from whoosh.writing import IndexingError
  from whoosh.util.numeric import length_to_byte, byte_to_length
  from whoosh.util.testing import TempIndex, TempStorage
label_desc: Use image node_id 7 for calling a global function with example usage: test_many_lengths() without return types