code: def test_multihop_join_plan_ambiguous_dim(  # noqa: D
      mf_test_session_state: MetricFlowTestSessionState,
      dataflow_plan_builder: DataflowPlanBuilder,
  ) -> None:
      """Checks that an exception is thrown when trying to build a plan with an ambiguous dimension."""
      with pytest.raises(UnableToSatisfyQueryError):
          dataflow_plan_builder.build_plan(
              MetricFlowQuerySpec(
                  metric_specs=(MetricSpec(element_name="views"),),
                  dimension_specs=(
                      DimensionSpec(
                          element_name="home_country",
                          entity_links=(
                              EntityReference(element_name="listing"),
                              EntityReference(element_name="user"),
                          ),
                      ),
                  ),
              )
          )
  
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_to_text import dataflow_plan_as_text
  from metricflow.dataset.dataset import DataSet
  from metricflow.errors.errors import UnableToSatisfyQueryError
  from metricflow.query.query_parser import MetricFlowQueryParser
  from metricflow.specs.column_assoc import ColumnAssociationResolver
  from metricflow.specs.specs import DimensionSpec, EntityReference, MetricFlowQuerySpec, MetricSpec, OrderBySpec, TimeDimensionSpec
  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
  from metricflow.test.time.metric_time_dimension import MTD_SPEC_DAY, MTD_SPEC_MONTH, MTD_SPEC_QUARTER
label_desc: Use image node_id 13 for calling a global function with example usage: test_multihop_join_plan_ambiguous_dim(mf_test_session_state, dataflow_plan_builder) without return types