code: def run_tests(
      test_configuration: MetricFlowTestConfiguration,
  ) -> None:  # noqa: D
      set_engine_env_variables(test_configuration)
  
      if test_configuration.engine is SqlEngine.DUCKDB:
          # DuckDB is fast, so generate all snapshots, including the engine-agnostic ones
          run_command(
              f"pytest -x -vv -n 4 --overwrite-snapshots -k 'not itest' {TEST_DIRECTORY}"
          )
      elif (
          test_configuration.engine is SqlEngine.REDSHIFT
          or test_configuration.engine is SqlEngine.SNOWFLAKE
          or test_configuration.engine is SqlEngine.BIGQUERY
          or test_configuration.engine is SqlEngine.DATABRICKS
          or test_configuration.engine is SqlEngine.POSTGRES
          or test_configuration.engine is SqlEngine.TRINO
      ):
          engine_name = test_configuration.engine.value.lower()
          os.environ["MF_TEST_ADAPTER_TYPE"] = engine_name
          hatch_env = f"{engine_name}-env"
          use_persistent_source_schema = (
              test_configuration.engine != SqlEngine.POSTGRES
              and test_configuration.engine != SqlEngine.TRINO
          )
          run_command(
              f"hatch -v run {hatch_env}:pytest -x -vv -n 4 "
              f"--overwrite-snapshots"
              f"{' --use-persistent-source-schema' if use_persistent_source_schema else ''}"
              f" -m '{SQL_ENGINE_SNAPSHOT_MARKER_NAME}' "
              f"{TEST_DIRECTORY}"
          )
      else:
          assert_values_exhausted(test_configuration.engine)
  
file_path: metricflow/metricflow/test/generate_snapshots.py
imports: from __future__ import annotations
  import logging
  import os
  from dataclasses import dataclass
  from typing import Callable, Optional, Sequence
  from dbt_semantic_interfaces.enum_extension import assert_values_exhausted
  from dbt_semantic_interfaces.implementations.base import FrozenBaseModel
  from metricflow.protocols.sql_client import SqlEngine
  from metricflow.test.fixtures.setup_fixtures import SQL_ENGINE_SNAPSHOT_MARKER_NAME
label_desc: Use image node_id 3 for calling a global function with example usage: run_tests(test_configuration) without return types