class_docstr: Describes a set of data that a source node in the dataflow plan contains.
class_docstr_tok: ["Describes","a","set","of","data","that","a","source","node","in","the","dataflow","plan","contains","."]
docstr: Spec that corresponds to DataSet.metric_time_dimension_reference.
docstr_tok: ["Spec","that","corresponds","to","DataSet.metric_time_dimension_reference","."]
code: def metric_time_dimension_spec(
      time_granularity: TimeGranularity,
      date_part: Optional[DatePart] = None,
  ) -> TimeDimensionSpec:
      """Spec that corresponds to DataSet.metric_time_dimension_reference."""
      return TimeDimensionSpec(
          element_name=DataSet.metric_time_dimension_reference().element_name,
          entity_links=(),
          time_granularity=time_granularity,
          date_part=date_part,
      )
  
file_path: metricflow/metricflow/dataset/dataset.py
imports: from __future__ import annotations
  import logging
  from typing import Optional, Sequence
  from dbt_semantic_interfaces.references import TimeDimensionReference
  from dbt_semantic_interfaces.type_enums.date_part import DatePart
  from dbt_semantic_interfaces.type_enums.time_granularity import TimeGranularity
  from dbt_semantic_interfaces.validations.unique_valid_name import MetricFlowReservedKeywords
  from metricflow.instances import InstanceSet, TimeDimensionInstance
  from metricflow.specs.specs import TimeDimensionSpec
label_desc: Use image node_id 6 for calling the DataSet obj's underlying member method code with example usage: obj.metric_time_dimension_spec(time_granularity, date_part) and returns: TimeDimensionSpec