import fnmatch


def _Matches(path, pattern_list):
  """Returns true if path matches any patten found in pattern_list.

  Args:
    path: A dot separated path to a package, class, method or variable
    pattern_list: A list of wildcard patterns

  Returns:
    True if path matches any wildcard found in pattern_list.
  """
  # Note: This code does not scale to large pattern_list sizes.
  return any(fnmatch.fnmatchcase(path, pattern) for pattern in pattern_list)