class_docstr: Resolves specs for Dimension & TimeDimension given name, grain, & entity path. Utilized in where clause in Jinja syntax.
class_docstr_tok: ["Resolves","specs","for","Dimension","&","TimeDimension","given","name",",","grain",",","&","entity","path",".","Utilized","in","where","clause","in","Jinja","syntax","."]
docstr: Resolve TimeDimension spec with the call_parameter_sets.
docstr_tok: ["Resolve","TimeDimension","spec","with","the","call_parameter_sets","."]
code: def resolve_time_dimension_spec(
      self,
      name: str,
      time_granularity: Optional[TimeGranularity],
      entity_path: Sequence[str],
      date_part: Optional[DatePart],
  ) -> TimeDimensionSpec:
      """Resolve TimeDimension spec with the call_parameter_sets."""
      structured_name = DunderedNameFormatter.parse_name(name)
      call_parameter_set = TimeDimensionCallParameterSet(
          time_dimension_reference=TimeDimensionReference(
              element_name=structured_name.element_name
          ),
          time_granularity=time_granularity,
          entity_path=(
              tuple(
                  EntityReference(element_name=arg)
                  for arg in entity_path
              )
              + structured_name.entity_links
          ),
          date_part=date_part,
      )
      assert (
          call_parameter_set
          in self._call_parameter_sets.time_dimension_call_parameter_sets
      )
      return TimeDimensionSpec(
          element_name=call_parameter_set.time_dimension_reference.element_name,
          entity_links=call_parameter_set.entity_path,
          time_granularity=(
              call_parameter_set.time_granularity
              # TODO: This should be updated once resolution of unspecified grain is supported.
              if call_parameter_set.time_granularity is not None
              else DEFAULT_TIME_GRANULARITY
          ),
          date_part=call_parameter_set.date_part,
      )
  
file_path: metricflow/metricflow/specs/dimension_spec_resolver.py
imports: from __future__ import annotations
  from typing import Optional, Sequence
  from dbt_semantic_interfaces.call_parameter_sets import DimensionCallParameterSet, FilterCallParameterSets, TimeDimensionCallParameterSet
  from dbt_semantic_interfaces.naming.dundered import DunderedNameFormatter
  from dbt_semantic_interfaces.references import DimensionReference, EntityReference, TimeDimensionReference
  from dbt_semantic_interfaces.type_enums import TimeGranularity
  from dbt_semantic_interfaces.type_enums.date_part import DatePart
  from metricflow.specs.specs import DEFAULT_TIME_GRANULARITY, DimensionSpec, TimeDimensionSpec
label_desc: Use image node_id 3 for calling the DimensionSpecResolver obj's underlying member method code with example usage: obj.resolve_time_dimension_spec(name, time_granularity, entity_path, date_part) and returns: TimeDimensionSpec