code: def make_test_sql_client(
      url: str, password: str, schema: str
  ) -> SqlClientWithDDLMethods:
      """Build SQL client based on env configs."""
      # TODO: Switch on an enum of adapter type when all engines are cut over
      dialect = dialect_from_url(url=url)
  
      if dialect == SqlDialect.REDSHIFT:
          __configure_test_env_from_url(
              url, password=password, schema=schema
          )
          __initialize_dbt()
          return AdapterBackedDDLSqlClient(
              adapter=get_adapter_by_type("redshift")
          )
      elif dialect == SqlDialect.SNOWFLAKE:
          parsed_url = __configure_test_env_from_url(
              url, password=password, schema=schema
          )
          assert (
              "warehouse" in parsed_url.normalized_query
          ), "Sql engine URL params did not include Snowflake warehouse!"
          warehouses = parsed_url.normalized_query["warehouse"]
          assert (
              len(warehouses) == 1
          ), f"Found more than 1 warehouse in Snowflake URL: `{warehouses}`"
          os.environ[DBT_ENV_SECRET_WAREHOUSE] = warehouses[0]
          __initialize_dbt()
          return AdapterBackedDDLSqlClient(
              adapter=get_adapter_by_type("snowflake")
          )
      elif dialect == SqlDialect.BIGQUERY:
          __configure_bigquery_env_from_credential_string(
              password=password, schema=schema
          )
          __initialize_dbt()
          return AdapterBackedDDLSqlClient(
              adapter=get_adapter_by_type("bigquery")
          )
      elif dialect == SqlDialect.POSTGRESQL:
          __configure_test_env_from_url(
              url, password=password, schema=schema
          )
          __initialize_dbt()
          return AdapterBackedDDLSqlClient(
              adapter=get_adapter_by_type("postgres")
          )
      elif dialect == SqlDialect.DUCKDB:
          __configure_test_env_from_url(
              url, password=password, schema=schema
          )
          __initialize_dbt()
          return AdapterBackedDDLSqlClient(
              adapter=get_adapter_by_type("duckdb")
          )
      elif dialect == SqlDialect.DATABRICKS:
          __configure_databricks_env_from_url(
              url, password=password, schema=schema
          )
          __initialize_dbt()
          return AdapterBackedDDLSqlClient(
              adapter=get_adapter_by_type("databricks")
          )
      elif dialect == SqlDialect.TRINO:
          __configure_test_env_from_url(
              url, password=password, schema=schema
          )
          __initialize_dbt()
          return AdapterBackedDDLSqlClient(
              adapter=get_adapter_by_type("trino")
          )
      else:
          raise ValueError(f"Unknown dialect: `{dialect}` in URL {url}")
  
imports: from __future__ import annotations
  import json
  import logging
  import os
  from typing import Generator
  import pytest
  import sqlalchemy
  from dbt.adapters.factory import get_adapter_by_type
  from dbt.cli.main import dbtRunner
  from metricflow.protocols.sql_client import SqlClient
  from metricflow.test.fixtures.setup_fixtures import MetricFlowTestSessionState, dbt_project_dir, dialect_from_url
  from metricflow.test.fixtures.sql_clients.adapter_backed_ddl_client import AdapterBackedDDLSqlClient
  from metricflow.test.fixtures.sql_clients.common_client import SqlDialect
  from metricflow.test.fixtures.sql_clients.ddl_sql_client import SqlClientWithDDLMethods
label_desc: Use image node_id 5 for calling a global function with example usage: make_test_sql_client(url, password, schema) and returns: AdapterBackedDDLSqlClient, AdapterBackedDDLSqlClient, AdapterBackedDDLSqlClient, AdapterBackedDDLSqlClient, AdapterBackedDDLSqlClient, AdapterBackedDDLSqlClient, AdapterBackedDDLSqlClient