human
I wrote the below code

    def container_removed(expected):
        '\n                                Check    whether    a    container    has    been    removed    (deleted    and    stopped).\n\n                                :param    ContainerState    expected:    A    container    state    to    match    against    the\n                                                results    of    ``list_containers_state``.\n                                :return    Deferred[Optional[ContainerState]]:    ``None``    if    the\n                                                ``expected``    container    is    found,    or    ``expected``    if    it    is    not\n                                                found.\n                                '
        d = control_service.list_containers_state()
        def container_matches(inspecting, expected):
            return ((expected.name == inspecting.name) and (expected.node_uuid == inspecting.node_uuid) and inspecting.running)
        def no_running_match(existing_state):
            for state in existing_state:
                if container_matches(state, expected):
                    return None
            return expected
        d.addCallback(no_running_match)
        return d
    d = control_service.delete_container(container.name)
    def loop_until_container_removed(_ignore):
        return loop_until(reactor, partial(container_removed, container))
    d.addCallback(loop_until_container_removed)
    return d

What's a good function header?

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

def delete_container(reactor, control_service, container):