code: def test_2_metrics_from_2_semantic_models(  # noqa: D
      request: FixtureRequest,
      mf_test_session_state: MetricFlowTestSessionState,
      dataflow_plan_builder: DataflowPlanBuilder,
  ) -> None:
      """Tests that 2 metrics from the 2 semantic models results in 2 scans."""
      check_optimization(
          request=request,
          mf_test_session_state=mf_test_session_state,
          dataflow_plan_builder=dataflow_plan_builder,
          query_spec=MetricFlowQuerySpec(
              metric_specs=(
                  MetricSpec(element_name="bookings"),
                  MetricSpec(element_name="listings"),
              ),
              dimension_specs=(
                  DataSet.metric_time_dimension_spec(
                      TimeGranularity.DAY
                  ),
              ),
          ),
          expected_num_sources_in_unoptimized=2,
          expected_num_sources_in_optimized=2,
      )
  
imports: from __future__ import annotations
  import logging
  import pytest
  from _pytest.fixtures import FixtureRequest
  from dbt_semantic_interfaces.naming.keywords import METRIC_TIME_ELEMENT_NAME
  from dbt_semantic_interfaces.type_enums.time_granularity import TimeGranularity
  from metricflow.dataflow.builder.dataflow_plan_builder import DataflowPlanBuilder
  from metricflow.dataflow.dataflow_plan import AddGeneratedUuidColumnNode, AggregateMeasuresNode, CombineAggregatedOutputsNode, ComputeMetricsNode, ConstrainTimeRangeNode, DataflowPlan, DataflowPlanNode, DataflowPlanNodeVisitor, FilterElementsNode, JoinConversionEventsNode, JoinOverTimeRangeNode, JoinToBaseOutputNode, JoinToTimeSpineNode, MetricTimeDimensionTransformNode, MinMaxNode, OrderByLimitNode, ReadSqlSourceNode, SemiAdditiveJoinNode, WhereConstraintNode, WriteToResultDataframeNode, WriteToResultTableNode
  from metricflow.dataflow.dataflow_plan_to_text import dataflow_plan_as_text
  from metricflow.dataflow.optimizer.source_scan.source_scan_optimizer import SourceScanOptimizer
  from metricflow.dataset.dataset import DataSet
  from metricflow.query.query_parser import MetricFlowQueryParser
  from metricflow.specs.column_assoc import ColumnAssociationResolver
  from metricflow.specs.specs import DimensionSpec, EntityReference, MetricFlowQuerySpec, MetricSpec
  from metricflow.test.dataflow_plan_to_svg import display_graph_if_requested
  from metricflow.test.fixtures.setup_fixtures import MetricFlowTestSessionState
  from metricflow.test.snapshot_utils import assert_plan_snapshot_text_equal
label_desc: Use image node_id 3 for calling a global function with example usage: test_2_metrics_from_2_semantic_models(request, mf_test_session_state, dataflow_plan_builder) without return types