code: def _match_path_parts(path_parts, pattern_parts, all):
      if len(path_parts) < len(pattern_parts):
          return False
      for i, pattern_part in enumerate(pattern_parts):
          if not fnmatch.fnmatch(path_parts[i], pattern_part):
              return False
      if not all:
          for i, path_part in enumerate(path_parts):
              if _is_hidden_name(path_part):
                  maybe_pattern = (
                      pattern_parts[i]
                      if i < len(pattern_parts)
                      else None
                  )
                  if not maybe_pattern or not _is_hidden_name(
                      maybe_pattern
                  ):
                      return False
      return True
  
imports: import fnmatch
  import logging
  import re
  import os
  from guild import cli
  from guild import run_manifest
  from guild import util
  from .None import remote_impl_support
  from .None import runs_impl
label_desc: Use image node_id 14 for calling a global function with example usage: _match_path_parts(path_parts, pattern_parts, all) and returns: True, False, False, False