def METHOD_NAME():
    # merge
    path1 = path2 = op.join(datadir, "toy.asymm.2.cool")
    out_path = "test.cool"
    for append in (True, False):
        with isolated_filesystem():
            with h5py.File("test.cool", "w") as f:
                f.attrs["xxxx"] = True
            merge_coolers(
                out_path,
                [path1, path2],
                mergebuf=int(15e6),
                mode="a" if append else "w"
            )
            with h5py.File(out_path, "r") as f:
                if append:
                    assert "xxxx" in f.attrs
                else:
                    assert "xxxx" not in f.attrs
    # coarsen
    input_path = op.join(datadir, "toy.symm.upper.2.cool")
    out_path = "test.cool"
    for append in (True, False):
        with isolated_filesystem():
            with h5py.File("test.cool", "w") as f:
                f.attrs["xxxx"] = True
            coarsen_cooler(
                input_path,
                "test.cool",
                2,
                chunksize=10,
                nproc=1,
                columns=None,
                dtypes=None,
                agg=None,
                mode="a" if append else "w"
            )
            with h5py.File(out_path, "r") as f:
                if append:
                    assert "xxxx" in f.attrs
                else:
                    assert "xxxx" not in f.attrs