code: def _compile_pattern(pat):
      if isinstance(pat, bytes):
          pat_str = str(pat, "ISO-8859-1")
          res_str = translate(pat_str)
          res = bytes(res_str, "ISO-8859-1")
      else:
          res = translate(pat)
      return re.compile(res).match
  
file_path: cpython/Lib/fnmatch.py
imports: import os
  import posixpath
  import re
  import functools
label_desc: Use image node_id 2 for calling a global function with example usage: _compile_pattern(pat) and returns: re