code: def ddl_sql_client(
      mf_test_session_state: MetricFlowTestSessionState,
  ) -> Generator[SqlClientWithDDLMethods, None, None]:
      """Provides a SqlClient with the necessary DDL and data loading methods for test configuration.
  
      This allows us to provide the operations necessary for executing the test suite without exposing those methods in
      MetricFlow's core SqlClient protocol.
      """
      sql_client = make_test_sql_client(
          url=mf_test_session_state.sql_engine_url,
          password=mf_test_session_state.sql_engine_password,
          schema=mf_test_session_state.mf_source_schema,
      )
      logger.info(
          f"Creating schema '{mf_test_session_state.mf_system_schema}'"
      )
      sql_client.create_schema(mf_test_session_state.mf_system_schema)
      if (
          mf_test_session_state.mf_system_schema
          != mf_test_session_state.mf_source_schema
      ):
          logger.info(
              f"Creating schema '{mf_test_session_state.mf_source_schema}'"
          )
          sql_client.create_schema(
              mf_test_session_state.mf_source_schema
          )
  
      yield sql_client
  
      logger.info(
          f"Dropping schema '{mf_test_session_state.mf_system_schema}'"
      )
      sql_client.drop_schema(
          mf_test_session_state.mf_system_schema, cascade=True
      )
      if (
          mf_test_session_state.mf_system_schema
          != mf_test_session_state.mf_source_schema
          and not mf_test_session_state.use_persistent_source_schema
      ):
          logger.info(
              f"Dropping schema '{mf_test_session_state.mf_source_schema}'"
          )
          sql_client.drop_schema(
              mf_test_session_state.mf_source_schema, cascade=True
          )
  
      sql_client.close()
      return None
  
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 6 for calling a global function with example usage: ddl_sql_client(mf_test_session_state) and returns: None