code: def _find_glob_matches(in_files, metadata):
      
      reg_files = copy.deepcopy(in_files)
      glob_files = []
      for glob_search in [x for x in metadata.keys() if "*" in x]:
          cur = []
          for fname in in_files:
              if fnmatch.fnmatch(fname, "*/%s" % glob_search):
                  cur.append(fname)
                  reg_files.remove(fname)
          assert cur, "Did not find file matches for %s" % glob_search
          glob_files.append(cur)
      return reg_files, glob_files
docs: Group files that match by globs for merging, rather than by explicit pairs.