code: def _category_key(cats):
      """Return a normalised tuple of all Unicode categories that are in
      `include`, but not in `exclude`.
  
      If include is None then default to including all categories.
      Any item in include that is not a unicode character will be excluded.
  
      >>> _category_key(exclude=['So'], include=['Lu', 'Me', 'Cs', 'So'])
      ('Me', 'Lu', 'Cs')
      """
      cs = categories()
      if cats is None:
          cats = set(cs)
      return tuple(c for c in cs if c in cats)
  
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 6 for calling a global function with example usage: _category_key(cats) and returns: tuple