code: def match_files(
      patterns: Iterable[Pattern],
      files: Iterable[str],
  ) -> Set[str]:
      """
      DEPRECATED: This is an old function no longer used. Use the
      :func:`~pathspec.util.match_file` function with a loop for better results.
  
      Matches the files to the patterns.
  
      *patterns* (:class:`~collections.abc.Iterable` of :class:`~pathspec.pattern.Pattern`)
      contains the patterns to use.
  
      *files* (:class:`~collections.abc.Iterable` of :class:`str`) contains
      the normalized file paths to be matched against *patterns*.
  
      Returns the matched files (:class:`set` of :class:`str`).
      """
      warnings.warn(
          (
              f"{__name__}.match_files() is deprecated. Use {__name__}.match_file() with "
              f"a loop for better results."
          ),
          DeprecationWarning,
          stacklevel=2,
      )
  
      use_patterns = [
          __pat for __pat in patterns if __pat.include is not None
      ]
  
      return_files = set()
      for file in files:
          if match_file(use_patterns, file):
              return_files.add(file)
  
      return return_files
  
imports: import os
  import os.path
  import pathlib
  import posixpath
  import stat
  import sys
  import warnings
  from collections.abc import Collection, Iterable
  from dataclasses import dataclass
  from os import PathLike
  from typing import Any, AnyStr, Callable, Collection, Dict, Generic, Iterable, Iterator, List, Optional, Sequence, Set, Tuple, TypeVar, Union
  from .pattern import Pattern
label_desc: Use image node_id 12 for calling a global function with example usage: match_files(patterns, files) and returns: return_files