code: def test_range_gaps():
      schema = fields.Schema(id=fields.STORED, num=fields.NUMERIC)
      ix = RamStorage().create_index(schema)
      w = ix.writer()
      for i in range(10):
          w.add_document(id=i, num=i)
      w.commit()
  
      with ix.searcher() as s:
          rf = sorting.RangeFacet("num", 0, 1000, [1, 2, 3])
          r = s.search(query.Every(), groupedby={"num": rf})
          assert r.groups("num") == {
              (0, 1): [0],
              (1, 3): [1, 2],
              (3, 6): [3, 4, 5],
              (6, 9): [6, 7, 8],
              (9, 12): [9],
          }
  
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 20 for calling a global function with example usage: test_range_gaps() without return types