code: def query(
      *,
      categories=None,
      min_codepoint=None,
      max_codepoint=None,
      include_characters="",
      exclude_characters="",
  ):
      """Return a tuple of intervals covering the codepoints for all characters
      that meet the criteria.
  
      >>> query()
      ((0, 1114111),)
      >>> query(min_codepoint=0, max_codepoint=128)
      ((0, 128),)
      >>> query(min_codepoint=0, max_codepoint=128, categories=['Lu'])
      ((65, 90),)
      >>> query(min_codepoint=0, max_codepoint=128, categories=['Lu'],
      ...       include_characters='☃')
      ((65, 90), (9731, 9731))
      """
      if min_codepoint is None:
          min_codepoint = 0
      if max_codepoint is None:
          max_codepoint = sys.maxunicode
      catkey = _category_key(categories)
      character_intervals = IntervalSet.from_string(
          include_characters or ""
      )
      exclude_intervals = IntervalSet.from_string(
          exclude_characters or ""
      )
      qkey = (
          catkey,
          min_codepoint,
          max_codepoint,
          character_intervals.intervals,
          exclude_intervals.intervals,
      )
      try:
          return limited_category_index_cache[qkey]
      except KeyError:
          pass
      base = _query_for_key(catkey)
      result = []
      for u, v in base:
          if v >= min_codepoint and u <= max_codepoint:
              result.append(
                  (max(u, min_codepoint), min(v, max_codepoint))
              )
      result = (
          IntervalSet(result) | character_intervals
      ) - exclude_intervals
      limited_category_index_cache[qkey] = result
      return result
  
file_path: catboost/contrib/python/hypothesis/py3/hypothesis/internal/charmap.py
imports: import codecs
  import gzip
  import json
  import os
  import sys
  import tempfile
  import unicodedata
  from functools import lru_cache
  from typing import Dict, Tuple
  from hypothesis.configuration import storage_directory
  from hypothesis.errors import InvalidArgument
  from hypothesis.internal.intervalsets import IntervalSet
label_desc: Use image node_id 8 for calling a global function with example usage: query() and returns: result, limited_category_index_cache