code: def handler(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)
      handler = MySQLHandler("test_mysql_handler", **HANDLER_KWARGS)
      yield handler
  
      # 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}")
  
imports: import time
  import os
  import shutil
  import tarfile
  import pytest
  import docker
  from mindsdb.integrations.handlers.mysql_handler.mysql_handler import MySQLHandler
  from mindsdb.api.executor.data_types.response_type import RESPONSE_TYPE
label_desc: Use image node_id 4 for calling a global function with example usage: handler(request) without return types