code: def test_validate_metrics(  # noqa: D
      dw_backed_warehouse_validation_model: PydanticSemanticManifest,
      sql_client: SqlClient,
      mf_test_session_state: MetricFlowTestSessionState,
  ) -> None:
      model = deepcopy(dw_backed_warehouse_validation_model)
      dw_validator = DataWarehouseModelValidator(sql_client=sql_client)
  
      issues = dw_validator.validate_metrics(model)
      assert len(issues.all_issues) == 0
  
      # Update model to have a new measure which creates a new metric by proxy
      new_measures = list(model.semantic_models[0].measures)
      new_measures.append(
          PydanticMeasure(
              name="count_cats",
              agg=AggregationType.SUM,
              expr="is_cat",  # doesn't exist as column
              create_metric=True,
          )
      )
      model.semantic_models[0].measures = new_measures
      model.metrics = []
      model = PydanticSemanticManifestTransformer.transform(model)
  
      # Validate new metric created by proxy causes an issue (because the column used doesn't exist)
      dw_validator = DataWarehouseModelValidator(sql_client=sql_client)
      issues = dw_validator.validate_metrics(model)
      assert len(issues.all_issues) == 1
      assert len(issues.errors) == 1
      assert (
          "Unable to query metric `count_cats`"
          in issues.errors[0].message
      )
  
imports: from __future__ import annotations
  from copy import deepcopy
  from typing import Tuple
  import pytest
  from _pytest.fixtures import FixtureRequest
  from dbt_semantic_interfaces.implementations.elements.dimension import PydanticDimension
  from dbt_semantic_interfaces.implementations.elements.entity import PydanticEntity
  from dbt_semantic_interfaces.implementations.elements.measure import PydanticMeasure
  from dbt_semantic_interfaces.implementations.semantic_manifest import PydanticSemanticManifest
  from dbt_semantic_interfaces.protocols.dimension import DimensionType
  from dbt_semantic_interfaces.protocols.entity import EntityType
  from dbt_semantic_interfaces.test_utils import semantic_model_with_guaranteed_meta
  from dbt_semantic_interfaces.transformations.semantic_manifest_transformer import PydanticSemanticManifestTransformer
  from dbt_semantic_interfaces.type_enums.aggregation_type import AggregationType
  from metricflow.model.data_warehouse_model_validator import DataWarehouseModelValidator, DataWarehouseTaskBuilder, DataWarehouseValidationTask
  from metricflow.protocols.sql_client import SqlClient
  from metricflow.sql.sql_bind_parameters import SqlBindParameters
  from metricflow.test.fixtures.setup_fixtures import MetricFlowTestSessionState
  from metricflow.test.snapshot_utils import assert_snapshot_text_equal, make_schema_replacement_function
label_desc: Use image node_id 12 for calling a global function with example usage: test_validate_metrics(dw_backed_warehouse_validation_model, sql_client, mf_test_session_state) without return types