code: def test_date_facet():
      schema = fields.Schema(id=fields.STORED, date=fields.DATETIME)
      dc = schema["date"].default_column()
      assert isinstance(dc, columns.NumericColumn)
  
      ix = RamStorage().create_index(schema)
      w = ix.writer()
      d1 = datetime(2011, 7, 13)
      d2 = datetime(1984, 3, 29)
      w.add_document(id=0, date=d1)
      w.add_document(id=1, date=d1)
      w.add_document(id=2)
      w.add_document(id=3, date=d2)
      w.add_document(id=4)
      w.commit()
  
      with ix.searcher() as s:
          r = s.search(query.Every(), groupedby="date")
          assert r.groups()
          assert r.groups() == {d1: [0, 1], d2: [3], None: [2, 4]}
  
imports: from __future__ import with_statement
  from datetime import datetime, timedelta
  import random
  from whoosh import fields, query, sorting, columns
  from whoosh.compat import u
  from whoosh.compat import permutations, xrange
  from whoosh.filedb.filestore import RamStorage
  from whoosh.util.testing import TempIndex
label_desc: Use image node_id 18 for calling a global function with example usage: test_date_facet() without return types