code: def test_write_empty_vector():
      schema = fields.Schema(text=fields.TEXT(vector=True))
      with TempIndex(schema) as ix:
          with ix.writer() as w:
              w.add_document(
                  text=". . . . . . . . . . . . . . . . . . . . . . . . 1"
              )
  
file_path: whoosh/tests/test_vectors.py
imports: from __future__ import with_statement
  from whoosh import fields, formats
  from whoosh.compat import u
  from whoosh.filedb.filestore import RamStorage
  from whoosh.util.testing import TempIndex
label_desc: Use image node_id 6 for calling a global function with example usage: test_write_empty_vector() without return types