def METHOD_NAME(request):
    image_name = "mindsdb/mariadb-handler-test"
    docker_client = docker.from_env()
    with_ssl = request.param["ssl"]
    container = None
    try:
        container = docker_client.containers.run(
            image_name,
            command="--secure-file-priv=/",
            detach=True,
            environment={"MYSQL_ROOT_PASSWORD": "supersecret"},
            ports={"3306/tcp": 13306},
        )
        waitReadiness(container)
    # ubnormal teardown
    except Exception as e:
        if container is not None:
            container.kill()
        raise e
    if with_ssl:
        get_certificates(container)
    METHOD_NAME = MySQLHandler('test_mysql_handler', **HANDLER_KWARGS)
    yield METHOD_NAME
    # normal teardown
    container.kill()
    docker_client.close()
    if with_ssl:
        cur_dir = os.path.dirname(os.path.abspath(__file__))
        try:
            os.remove(os.path.join(cur_dir, CERTS_ARCHIVE))
            shutil.rmtree(os.path.join(cur_dir, CERTS_DIR))
        except Exception as e:
            print(f"unable to delete .tar/files of certificates: {e}")