code: def _fnmatch(path, pattern):
      if os.path.sep not in pattern:
          path = os.path.basename(path)
      pattern = _strip_leading_path_sep(pattern)
      return fnmatch.fnmatch(path, pattern)
  
imports: import fnmatch
  import glob
  import logging
  import os
  import re
  import shutil
  from guild import util
label_desc: Use image node_id 4 for calling a global function with example usage: _fnmatch(path, pattern) and returns: fnmatch