human
I wrote the below code

    context = _LOG_CONDITIONAL_CREATE()
    def create():
        d = client.list_datasets_configuration()
        def got_config(config):
            condition(config)
            return deferLater(reactor, 0.001, context.run, client.create_dataset, configuration_tag=config.tag, *args, **kwargs)
        d.addCallback(got_config)
        return d
    with context.context():
        result = DeferredContext(retry_failure(reactor, create, [ConfigurationChanged], ([0.001] * 19)))
        result.addActionFinish()
        return result.result

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

def conditional_create(client, reactor, condition, *args, **kwargs):