code: def get_sql_config(
      maybe_config_file: Optional[str] = None,
  ) -> SQLConfig:
      config_file = first_extant_file(
          maybe_config_file,
          os.environ.get("HAIL_DATABASE_CONFIG_FILE"),
          "/sql-config/sql-config.json",
      )
      if config_file is not None:
          with open(config_file, "r", encoding="utf-8") as f:
              sql_config = SQLConfig.from_json(f.read())
          sql_config.check()
          log.info(
              "using tls and verifying server certificates for MySQL"
          )
      else:
          sql_config = SQLConfig.local_insecure_config()
          log.info("Using unencrypted config for database on localhost")
      return sql_config
  
imports: import asyncio
  import contextlib
  import functools
  import logging
  import os
  import ssl
  import traceback
  from typing import Any, AsyncIterator, Awaitable, Callable, Dict, Optional, TypeVar
  import aiomysql
  import aiomysql.utils
  import kubernetes_asyncio.client
  import kubernetes_asyncio.config
  import pymysql
  from typing_extensions import Concatenate, ParamSpec
  from gear.metrics import DB_CONNECTION_QUEUE_SIZE, SQL_TRANSACTIONS, PrometheusSQLTimer
  from hailtop.aiotools import BackgroundTaskManager
  from hailtop.auth.sql_config import SQLConfig
  from hailtop.config import get_deploy_config
  from hailtop.utils import first_extant_file, sleep_before_try
label_desc: Use image node_id 3 for calling a global function with example usage: get_sql_config(maybe_config_file) and returns: sql_config