def METHOD_NAME(infer_manifest, veri_pair):
    with open(infer_manifest) as ff, open(veri_pair) as gg, tempfile.NamedTemporaryFile(
        "w", delete=False
    ) as ww:
        fnames = ff.read().strip().split("\n")
        basedir = fnames[0]
        needed_fname = []
        for gi in gg.read().strip().split("\n"):
            _, x1, x2 = gi.split()
            needed_fname.append(x1)
            needed_fname.append(x2)
        needed_fname = set(needed_fname)
        ww.write(basedir + "\n")
        for ii in range(1, len(fnames)):
            x1, x2 = fnames[ii].split()
            if x1 in needed_fname:
                ww.write(fnames[ii] + "\n")
    print(f"| subset manifest for verification: {ww.name}")
    return ww.name