class_docstr: When joining data sets, this class helps to figure out the necessary partition specs to join on.
docstr: Return the time dimension spec with the smallest granularity, then fewest entity links.
docstr_tok: ["Return","the","time","dimension","spec","with","the","smallest","granularity",",","then","fewest","entity","links","."]
code: def _get_simplest_time_dimension_spec(
      time_dimension_specs: Sequence[TimeDimensionSpec],
  ) -> TimeDimensionSpec:
      """Return the time dimension spec with the smallest granularity, then fewest entity links."""
      assert len(time_dimension_specs) > 0
      sorted_specs = sorted(
          time_dimension_specs,
          key=lambda x: (x.time_granularity, len(x.entity_links)),
      )
      return sorted_specs[0]
  
file_path: metricflow/metricflow/dataflow/builder/partitions.py
imports: from __future__ import annotations
  from collections import OrderedDict
  from dataclasses import dataclass
  from typing import List, Sequence, Tuple
  from metricflow.dataset.dataset import DataSet
  from metricflow.protocols.semantics import SemanticModelAccessor
  from metricflow.specs.specs import DimensionSpec, InstanceSpecSet, PartitionSpecSet, TimeDimensionSpec
label_desc: Use image node_id 5 for calling the PartitionJoinResolver obj's underlying member method code with example usage: obj._get_simplest_time_dimension_spec(time_dimension_specs) and returns: sorted_specs