code: def match_path_ls(
      path_ls, path_pattern, format_dict=None, default_format="\\w+"
  ):
      """Matches paths to each pattern
  
      Args:
          path_ls: List[str]
              List of paths
          path_pattern: str
              Input `tag_pattern` to tags_to_regex
          format_dict: Dict[str, str]
              See: tags_to_regex
          default_format: str
              See: tags_to_regex
  
      Returns: List[dict]
          List of matches
      """
      regex = re.compile(
          tags_to_regex(
              path_pattern,
              format_dict=format_dict,
              default_format=default_format,
          )
      )
      result_ls = []
      for path in path_ls:
          result = next(regex.finditer(path)).groupdict()
          assert "path" not in result, 'keyword clash: "path"'
          result["path"] = path
          result_ls.append(result)
      return result_ls
  
imports: import glob
  import re
label_desc: Use image node_id 3 for calling a global function with example usage: match_path_ls(path_ls, path_pattern, format_dict, default_format) and returns: result_ls