def METHOD_NAME(self, r):
    r.function_load(f"#!{engine} name={lib} \n {set_function}")
    payload = r.function_dump()
    assert r.fcall("set", 1, "foo", "bar") == b"OK"
    r.function_delete("mylib")
    with pytest.raises(ResponseError):
        r.fcall("set", 1, "foo", "bar")
    assert r.function_restore(payload)
    assert r.fcall("set", 1, "foo", "bar") == b"OK"
    r.function_load(f"#!{engine} name={lib2} \n {get_function}")
    assert r.fcall("get", 1, "foo") == b"bar"
    r.function_delete("mylib")
    assert r.function_restore(payload, "FLUSH")
    with pytest.raises(ResponseError):
        r.fcall("get", 1, "foo")