def apply_path_wildcard(stats, path_wildcard):
  def filtered(entries):
    return tuple(stat for stat in entries
                 if fnmatch.fnmatch(stat.path, path_wildcard.wildcard))
  return Stats(files=filtered(stats.files), dirs=filtered(stats.dirs), links=filtered(stats.links))
Filter the given Stats object using the given PathWildcard.
dataset/ETHPy150Open pantsbuild/pants/src/python/pants/engine/exp/fs.py/apply_path_wildcard