code: def test_range_facet():
      schema = fields.Schema(id=fields.STORED, price=fields.NUMERIC)
      ix = RamStorage().create_index(schema)
      w = ix.writer()
      w.add_document(id=0, price=200)
      w.add_document(id=1, price=100)
      w.add_document(id=2)
      w.add_document(id=3, price=50)
      w.add_document(id=4, price=500)
      w.add_document(id=5, price=125)
      w.commit()
  
      with ix.searcher() as s:
          rf = sorting.RangeFacet("price", 0, 1000, 100)
          r = s.search(query.Every(), groupedby={"price": rf})
          assert r.groups("price") == {
              (0, 100): [3],
              (100, 200): [1, 5],
              (200, 300): [0],
              (500, 600): [4],
              None: [2],
          }
  
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 19 for calling a global function with example usage: test_range_facet() without return types