human
I wrote the below code

    d = is_container_agent_running(node)
    def change_if_needed(enabled):
        if (enabled != to_enable):
            return set_container_agent_enabled_on_node(node, to_enable)
    d.addCallback(change_if_needed)
    return d

What's a good function header?

Here's a good function header?
assistant
#Here's a good function header.

def ensure_container_agent_enabled(node, to_enable):