code: def test_where_constrained_plan_time_dimension(  # noqa: D
      request: FixtureRequest,
      mf_test_session_state: MetricFlowTestSessionState,
      dataflow_plan_builder: DataflowPlanBuilder,
      query_parser: MetricFlowQueryParser,
  ) -> None:
      """Tests a simple plan getting a metric and a local dimension."""
      query_spec = query_parser.parse_and_validate_query(
          metric_names=("bookings",),
          group_by_names=("booking__is_instant",),
          where_constraint_str="{{ TimeDimension('metric_time', 'day') }} >= '2020-01-01'",
      )
      dataflow_plan = dataflow_plan_builder.build_plan(query_spec)
  
      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,
      )
  
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 11 for calling a global function with example usage: test_where_constrained_plan_time_dimension(request, mf_test_session_state, dataflow_plan_builder, query_parser) without return types