code: def test_compute_metrics_node_simple_expr(
      request: FixtureRequest,
      mf_test_session_state: MetricFlowTestSessionState,
      dataflow_to_sql_converter: DataflowToSqlQueryPlanConverter,
      consistent_id_object_repository: ConsistentIdObjectRepository,
      sql_client: SqlClient,
  ) -> None:
      """Tests the compute metrics node for expr type metrics sourced from a single measure."""
      measure_spec = MeasureSpec(
          element_name="booking_value",
      )
      entity_spec = LinklessEntitySpec.from_element_name(
          element_name="listing"
      )
      metric_input_measure_specs = (
          MetricInputMeasureSpec(measure_spec=measure_spec),
      )
      measure_source_node = (
          consistent_id_object_repository.simple_model_read_nodes[
              "bookings_source"
          ]
      )
      filtered_measure_node = FilterElementsNode(
          parent_node=measure_source_node,
          include_specs=InstanceSpecSet(
              measure_specs=(measure_spec,), entity_specs=(entity_spec,)
          ),
      )
  
      dimension_spec = DimensionSpec(
          element_name="country_latest",
          entity_links=(),
      )
      dimension_source_node = (
          consistent_id_object_repository.simple_model_read_nodes[
              "listings_latest"
          ]
      )
      filtered_dimension_node = FilterElementsNode(
          parent_node=dimension_source_node,
          include_specs=InstanceSpecSet(
              entity_specs=(entity_spec,),
              dimension_specs=(dimension_spec,),
          ),
      )
  
      join_node = JoinToBaseOutputNode(
          left_node=filtered_measure_node,
          join_targets=[
              JoinDescription(
                  join_node=filtered_dimension_node,
                  join_on_entity=entity_spec,
                  join_on_partition_dimensions=(),
                  join_on_partition_time_dimensions=(),
                  join_type=SqlJoinType.LEFT_OUTER,
              )
          ],
      )
  
      aggregated_measures_node = AggregateMeasuresNode(
          parent_node=join_node,
          metric_input_measure_specs=metric_input_measure_specs,
      )
      metric_spec = MetricSpec(element_name="booking_fees")
      compute_metrics_node = ComputeMetricsNode(
          parent_node=aggregated_measures_node,
          metric_specs=[metric_spec],
      )
  
      sink_node = WriteToResultDataframeNode(compute_metrics_node)
      dataflow_plan = DataflowPlan(
          "plan0", sink_output_nodes=[sink_node]
      )
  
      assert_plan_snapshot_text_equal(
          request=request,
          mf_test_session_state=mf_test_session_state,
          plan=dataflow_plan,
          plan_snapshot_text=dataflow_plan_as_text(dataflow_plan),
      )
  
      display_graph_if_requested(
          request=request,
          mf_test_session_state=mf_test_session_state,
          dag_graph=dataflow_plan,
      )
  
      convert_and_check(
          request=request,
          mf_test_session_state=mf_test_session_state,
          dataflow_to_sql_converter=dataflow_to_sql_converter,
          sql_client=sql_client,
          node=compute_metrics_node,
      )
  
imports: from __future__ import annotations
  from typing import List
  import pytest
  from _pytest.fixtures import FixtureRequest
  from dbt_semantic_interfaces.implementations.metric import PydanticMetricTimeWindow
  from dbt_semantic_interfaces.references import EntityReference, TimeDimensionReference
  from dbt_semantic_interfaces.test_utils import as_datetime
  from dbt_semantic_interfaces.type_enums.aggregation_type import AggregationType
  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 AggregateMeasuresNode, BaseOutput, CombineAggregatedOutputsNode, ComputeMetricsNode, ConstrainTimeRangeNode, DataflowPlan, FilterElementsNode, JoinDescription, JoinToBaseOutputNode, JoinToTimeSpineNode, MetricTimeDimensionTransformNode, OrderByLimitNode, SemiAdditiveJoinNode, WhereConstraintNode, WriteToResultDataframeNode
  from metricflow.dataflow.dataflow_plan_to_text import dataflow_plan_as_text
  from metricflow.filters.time_constraint import TimeRangeConstraint
  from metricflow.plan_conversion.dataflow_to_sql import DataflowToSqlQueryPlanConverter
  from metricflow.protocols.sql_client import SqlClient
  from metricflow.query.query_parser import MetricFlowQueryParser
  from metricflow.specs.column_assoc import ColumnAssociationResolver
  from metricflow.specs.specs import DimensionSpec, InstanceSpecSet, LinkableSpecSet, LinklessEntitySpec, MeasureSpec, MetricFlowQuerySpec, MetricInputMeasureSpec, MetricSpec, NonAdditiveDimensionSpec, OrderBySpec, TimeDimensionSpec, WhereFilterSpec
  from metricflow.sql.optimizer.optimization_levels import SqlQueryOptimizationLevel
  from metricflow.sql.sql_bind_parameters import SqlBindParameters
  from metricflow.sql.sql_plan import SqlJoinType
  from metricflow.test.dataflow_plan_to_svg import display_graph_if_requested
  from metricflow.test.fixtures.model_fixtures import ConsistentIdObjectRepository
  from metricflow.test.fixtures.setup_fixtures import MetricFlowTestSessionState
  from metricflow.test.snapshot_utils import assert_plan_snapshot_text_equal
  from metricflow.test.sql.compare_sql_plan import assert_rendered_sql_from_plan_equal, assert_sql_plan_text_equal
  from metricflow.test.time.metric_time_dimension import MTD_SPEC_DAY
label_desc: Use image node_id 9 for calling a global function with example usage: test_compute_metrics_node_simple_expr(request, mf_test_session_state, dataflow_to_sql_converter, consistent_id_object_repository, sql_client) without return types