code: def rex(expr):
      """Regular expression matcher to use together with transform functions"""
      r = re.compile(expr)
      return lambda key: isinstance(key, str) and r.match(key)
  
file_path: catboost/contrib/python/pyrsistent/py3/pyrsistent/_transformations.py
imports: import re
label_desc: Use image node_id 4 for calling a global function with example usage: rex(expr) and returns: function