code: def test_multivalue():
      ana = analysis.StemmingAnalyzer()
      schema = fields.Schema(
          id=fields.STORED,
          date=fields.DATETIME,
          num=fields.NUMERIC,
          txt=fields.TEXT(analyzer=ana),
      )
      ix = RamStorage().create_index(schema)
      with ix.writer() as w:
          w.add_document(id=1, date=datetime(2001, 1, 1), num=5)
          w.add_document(
              id=2,
              date=[datetime(2002, 2, 2), datetime(2003, 3, 3)],
              num=[1, 2, 3, 12],
          )
          w.add_document(txt=u("a b c").split())
  
      with ix.reader() as r:
          assert ("num", 3) in r
          assert ("date", datetime(2003, 3, 3)) in r
          assert " ".join(r.field_terms("txt")) == "a b c"
  
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 25 for calling a global function with example usage: test_multivalue() without return types