code: def test_query_facet_overlap():
      domain = u("abcdefghi")
      schema = fields.Schema(
          v=fields.KEYWORD(stored=True), num=fields.NUMERIC(stored=True)
      )
      ix = RamStorage().create_index(schema)
      with ix.writer() as w:
          for i, ltr in enumerate(domain):
              v = "%s %s" % (ltr, domain[8 - i])
              w.add_document(num=i, v=v)
  
      with ix.searcher() as s:
          q1 = query.TermRange("v", "a", "c")
          q2 = query.TermRange("v", "d", "f")
          q3 = query.TermRange("v", "g", "i")
  
          facets = sorting.Facets()
          facets.add_query(
              "myfacet",
              {"a-c": q1, "d-f": q2, "g-i": q3},
              allow_overlap=True,
          )
          r = s.search(query.Every(), groupedby=facets)
          gr = r.groups("myfacet")
          assert r.groups("myfacet") == {
              "a-c": [0, 1, 2, 6, 7, 8],
              "d-f": [3, 4, 5],
              "g-i": [0, 1, 2, 6, 7, 8],
          }
  
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 14 for calling a global function with example usage: test_query_facet_overlap() without return types