code: def run_cli(function_to_run: Callable) -> None:  # noqa: D
      # Setup logging.
      dev_format = "%(asctime)s %(levelname)s %(filename)s:%(lineno)d [%(threadName)s] - %(message)s"
      logging.basicConfig(level=logging.INFO, format=dev_format)
  
      credential_sets_json_str = os.environ.get(
          "MF_TEST_ENGINE_CREDENTIAL_SETS"
      )
      if credential_sets_json_str is None:
          raise ValueError(
              f"Environment variable: MF_TEST_ENGINE_CREDENTIAL_SETS has not been set. Please see the comment in "
              f"{__file__} for details on how to set it."
          )
  
      credential_sets = (
          MetricFlowTestCredentialSetForAllEngines.parse_raw(
              credential_sets_json_str
          )
      )
  
      logger.info(
          f"Running tests in '{TEST_DIRECTORY}' with the marker '{SQL_ENGINE_SNAPSHOT_MARKER_NAME}'"
      )
  
      for test_configuration in credential_sets.as_configurations:
          logger.info(
              f"Running tests for {test_configuration.engine} with URL: {test_configuration.credential_set.engine_url}"
          )
          function_to_run(test_configuration)
  
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 4 for calling a global function with example usage: run_cli(function_to_run) without return types