code: def test_dimension_time_dimension_parity(
      column_association_resolver: ColumnAssociationResolver,
  ) -> None:  # noqa
      def get_spec(dimension: str) -> WhereFilterSpec:
          where_filter = PydanticWhereFilter(
              where_sql_template="{{" + dimension + "}} = '2020'"
          )
          filter_location = WhereFilterLocation.for_query(
              (MetricReference("example_metric"),)
          )
          return WhereSpecFactory(
              column_association_resolver=column_association_resolver,
              spec_resolution_lookup=FilterSpecResolutionLookUp(
                  spec_resolutions=(
                      FilterSpecResolution(
                          lookup_key=ResolvedSpecLookUpKey(
                              filter_location=filter_location,
                              call_parameter_set=TimeDimensionCallParameterSet(
                                  entity_path=(),
                                  time_dimension_reference=TimeDimensionReference(
                                      METRIC_TIME_ELEMENT_NAME
                                  ),
                                  time_granularity=TimeGranularity.WEEK,
                                  date_part=DatePart.YEAR,
                              ),
                          ),
                          filter_location_path=MetricFlowQueryResolutionPath(
                              ()
                          ),
                          where_filter_intersection=PydanticWhereFilterIntersection(
                              where_filters=[where_filter]
                          ),
                          resolved_spec=TimeDimensionSpec(
                              element_name=METRIC_TIME_ELEMENT_NAME,
                              entity_links=(),
                              time_granularity=TimeGranularity.WEEK,
                              date_part=DatePart.YEAR,
                          ),
                          spec_pattern=ObjectBuilderNamingScheme().spec_pattern(
                              "Dimension('dummy__dimension')"
                          ),
                          issue_set=MetricFlowQueryResolutionIssueSet.empty_instance(),
                          object_builder_str="Dimension('dummy__dimension')",
                      ),
                  ),
                  non_parsable_resolutions=(),
              ),
          ).create_from_where_filter(filter_location, where_filter)
  
      time_dimension_spec = get_spec(
          "TimeDimension('metric_time', 'week', date_part_name='year')"
      )
      dimension_spec = get_spec(
          "Dimension('metric_time').date_part('year').grain('week')"
      )
  
      assert time_dimension_spec == dimension_spec
  
imports: from __future__ import annotations
  import logging
  import pytest
  from dbt_semantic_interfaces.call_parameter_sets import DimensionCallParameterSet, EntityCallParameterSet, TimeDimensionCallParameterSet
  from dbt_semantic_interfaces.implementations.filters.where_filter import PydanticWhereFilter, PydanticWhereFilterIntersection
  from dbt_semantic_interfaces.naming.keywords import METRIC_TIME_ELEMENT_NAME
  from dbt_semantic_interfaces.protocols import WhereFilterIntersection
  from dbt_semantic_interfaces.references import DimensionReference, EntityReference, MetricReference, TimeDimensionReference
  from dbt_semantic_interfaces.type_enums.date_part import DatePart
  from dbt_semantic_interfaces.type_enums.time_granularity import TimeGranularity
  from metricflow.naming.object_builder_scheme import ObjectBuilderNamingScheme
  from metricflow.query.group_by_item.filter_spec_resolution.filter_location import WhereFilterLocation
  from metricflow.query.group_by_item.filter_spec_resolution.filter_spec_lookup import CallParameterSet, FilterSpecResolution, FilterSpecResolutionLookUp, ResolvedSpecLookUpKey
  from metricflow.query.group_by_item.resolution_path import MetricFlowQueryResolutionPath
  from metricflow.query.issues.issues_base import MetricFlowQueryResolutionIssueSet
  from metricflow.specs.column_assoc import ColumnAssociationResolver
  from metricflow.specs.specs import DimensionSpec, EntitySpec, LinkableInstanceSpec, LinkableSpecSet, TimeDimensionSpec, WhereFilterSpec
  from metricflow.specs.where_filter_transform import WhereSpecFactory
  from metricflow.test.specs.conftest import EXAMPLE_FILTER_LOCATION
label_desc: Use image node_id 11 for calling a global function with example usage: test_dimension_time_dimension_parity(column_association_resolver) and returns: WhereSpecFactory