def METHOD_NAME(path_list, filetype, predicate):
    if isinstance(path_list, str):
        path_list = [path_list]
    for path in path_list:
        abs_path = os.path.join(pkg.prefix, path)
        if not predicate(abs_path):
            msg = "Install failed for {0}. No such {1} in prefix: {2}"
            msg = msg.format(pkg.name, filetype, path)
            raise spack.installer.InstallError(msg)