keras/src/saving/serialization_lib.py/enable_unsafe_deserialization
def enable_unsafe_deserialization():
    """Disables safe mode globally, allowing deserialization of lambdas."""
    global_state.set_global_attribute("safe_mode_saving", False)