code: def _query_for_key(key):
      """Return a tuple of codepoint intervals covering characters that match one
      or more categories in the tuple of categories `key`.
  
      >>> _query_for_key(categories())
      ((0, 1114111),)
      >>> _query_for_key(('Zl', 'Zp', 'Co'))
      ((8232, 8233), (57344, 63743), (983040, 1048573), (1048576, 1114109))
      """
      try:
          return category_index_cache[key]
      except KeyError:
          pass
      assert key
      if set(key) == set(categories()):
          result = ((0, sys.maxunicode),)
      else:
          result = _union_intervals(
              _query_for_key(key[:-1]), charmap()[key[-1]]
          )
      category_index_cache[key] = result
      return result
  
file_path: catboost/contrib/python/hypothesis/py2/hypothesis/internal/charmap.py
imports: from __future__ import absolute_import, division, print_function
  import gzip
  import json
  import os
  import sys
  import tempfile
  import unicodedata
  from hypothesis.configuration import mkdir_p, storage_directory
  from hypothesis.errors import InvalidArgument
  from hypothesis.internal.compat import hunichr
label_desc: Use image node_id 9 for calling a global function with example usage: _query_for_key(key) and returns: result, category_index_cache