human
Here's a good function header given the following:
I wrote the below code

    d = control_service.create_container(node_uuid, name, image, volumes)
    def wait_until_running(container):
        def container_matches(container, state):
            return ((container.name == state.name) and (container.node_uuid == state.node_uuid) and state.running)
        d = loop_until_state_found(reactor, control_service.list_containers_state, partial(container_matches, container), timeout)
        def delete_container(failure):
            d = control_service.delete_container(container.name)
            d.addCallback((lambda _ignore: failure))
            return d
        d.addErrback(delete_container)
        return d
    d.addCallback(wait_until_running)
    return d

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

def create_container(reactor, control_service, node_uuid, name, image, volumes=None, timeout=DEFAULT_TIMEOUT):