code: def test_no_lengths():
      f1 = fields.ID()
      st, codec, seg = _make_codec()
      dw = codec.per_document_writer(st, seg)
      dw.start_doc(0)
      dw.add_field("name", f1, None, None)
      dw.finish_doc()
      dw.start_doc(1)
      dw.add_field("name", f1, None, None)
      dw.finish_doc()
      dw.start_doc(2)
      dw.add_field("name", f1, None, None)
      dw.finish_doc()
      dw.close()
      seg.set_doc_count(3)
  
      pdr = codec.per_document_reader(st, seg)
      assert pdr.doc_field_length(0, "name") == 0
      assert pdr.doc_field_length(1, "name") == 0
      assert pdr.doc_field_length(2, "name") == 0
  
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 10 for calling a global function with example usage: test_no_lengths() without return types