def METHOD_NAME(get_instance):
    def condition_non_tls():
        sys.stderr.write("Waiting for ZK to boot...\n")
        booted = False
        dummy_instance = {'host': HOST, 'port': PORT, 'timeout': 500}
        for _ in range(10):
            try:
                out = ZookeeperCheck('zk', {}, [dummy_instance])._send_command('ruok')
                out.seek(0)
                if out.readline() != 'imok':
                    raise ZKConnectionFailure()
                booted = True
                break
            except ZKConnectionFailure:
                time.sleep(1)
        if not booted:
            raise RetryError("Zookeeper failed to boot!")
        sys.stderr.write("ZK boot complete.\n")
    is_tls = get_tls()
    compose_file = os.path.join(HERE, 'compose', 'zk.yaml')
    if [3, 5, 0] <= get_version() < [3, 6, 0]:
        compose_file = os.path.join(HERE, 'compose', 'zk35.yaml')
        if is_tls:
            compose_file = os.path.join(HERE, 'compose', 'zk35_ssl.yaml')
    elif get_version() >= [3, 6, 0]:
        compose_file = os.path.join(HERE, 'compose', 'zk36plus.yaml')
        if is_tls:
            compose_file = os.path.join(HERE, 'compose', 'zk36plus_ssl.yaml')
    private_key = os.path.join(HERE, 'compose/client', 'private_key.pem')
    cert = os.path.join(HERE, 'compose/client', 'cert.pem')
    ca_cert = os.path.join(HERE, 'compose/client', 'ca_cert.pem')
    if is_tls:
        condition = [
            CheckDockerLogs(compose_file, patterns=['Starting server', 'Started AdminServer', 'bound to port'])
        ]
    else:
        condition = [condition_non_tls]
    with docker_run(compose_file, conditions=condition, sleep=5):
        yield get_instance, {
            'docker_volumes': [
                '{}:/conf/private_key.pem'.format(private_key),
                '{}:/conf/cert.pem'.format(cert),
                '{}:/conf/ca_cert.pem'.format(ca_cert),
            ]
        }