def METHOD_NAME(tmp_path):
    tree = _get_large_tree()
    tmpfile1 = os.path.join(str(tmp_path), "test1.asdf")
    with asdf.AsdfFile(tree) as afile:
        afile.write_to(tmpfile1)
    tmpfile2 = os.path.join(str(tmp_path), "test2.asdf")
    with asdf.open(tmpfile1) as afile:
        assert afile.get_array_compression(afile.tree["science_data"]) is None
        afile.write_to(tmpfile2, all_array_compression="zlib")
    with asdf.open(tmpfile2) as afile:
        assert afile.get_array_compression(afile.tree["science_data"]) == "zlib"
        afile.write_to(tmpfile1, all_array_compression=None)
    with asdf.open(tmpfile1) as afile:
        helpers.assert_tree_match(tree, afile.tree)
        assert afile.get_array_compression(afile.tree["science_data"]) is None