def METHOD_NAME(tmpdir, loadsfile2):
    logger.info("Make cube...")
    cube2 = loadsfile2
    t2a = xtgeo.surface_from_file(TOP2A)
    t2b = xtgeo.surface_from_file(TOP2B)
    attlist = ["maxpos", "maxneg"]
    attrs1 = t2a.slice_cube_window(
        cube2, other=t2b, sampling="trilinear", attribute=attlist, algorithm=1
    )
    attrs2 = t2a.slice_cube_window(
        cube2, other=t2b, sampling="trilinear", attribute=attlist, algorithm=2
    )
    for att in attrs1.keys():
        srf1 = attrs1[att]
        srf2 = attrs2[att]
        srf1.to_file(join(tmpdir, "attr1_" + att + ".gri"))
        srf2.to_file(join(tmpdir, "attr2_" + att + ".gri"))
        assert srf1.values.mean() == pytest.approx(srf2.values.mean(), abs=0.005)