class_docstr: A pattern that matches group-by-items using the entity-link-path specification.
  
  The entity link path specifies how a group-by-item for a metric query should be constructed. The group-by-item
  is obtained by joining the semantic model containing the measure to a semantic model containing the group-by-
  item using a specified entity. Additional semantic models can be joined using additional entities to obtain the
  group-by-item. The series of entities that are used form the entity path. Since the entity path does not specify
  which semantic models need to be used, additional resolution is done in later stages to generate the necessary SQL.
class_docstr_tok: ["A","pattern","that","matches","group-by-items","using","the","entity-link-path","specification",".","The","entity","link","path","specifies","how","a","group-by-item","for","a","metric","query","should","be","constructed",".","The","group-by-item","is","obtained","by","joining","the","semantic","model","containing","the","measure","to","a","semantic","model","containing","the","group-by-","item","using","a","specified","entity",".","Additional","semantic","models","can","be","joined","using","additional","entities","to","obtain","the","group-by-item",".","The","series","of","entities","that","are","used","form","the","entity","path",".","Since","the","entity","path","does","not","specify","which","semantic","models","need","to","be","used",",","additional","resolution","is","done","in","later","stages","to","generate","the","necessary","SQL","."]
code: def match(
      self, candidate_specs: Sequence[InstanceSpec]
  ) -> Sequence[LinkableInstanceSpec]:
      filtered_candidate_specs = InstanceSpecSet.from_specs(
          candidate_specs
      ).linkable_specs
  
      matching_specs: List[LinkableInstanceSpec] = []
  
      # Using some Python introspection magic to figure out specs that match the listed fields.
      keys_to_check = set(
          field_to_compare.value
          for field_to_compare in self.parameter_set.fields_to_compare
      )
      # Checks that EntityLinkPatternParameterSetField is valid wrt to the parameter set.
      parameter_set_values = tuple(
          getattr(self.parameter_set, key_to_check)
          for key_to_check in keys_to_check
      )
  
      for spec in filtered_candidate_specs:
          spec_values = tuple(
              getattr(spec, key_to_check, None)
              for key_to_check in keys_to_check
          )
          if spec_values == parameter_set_values:
              matching_specs.append(spec)
  
      return matching_specs
  
imports: from __future__ import annotations
  import logging
  from dataclasses import dataclass
  from enum import Enum
  from typing import Any, List, Optional, Sequence, Tuple
  from dbt_semantic_interfaces.references import EntityReference
  from dbt_semantic_interfaces.type_enums import TimeGranularity
  from dbt_semantic_interfaces.type_enums.date_part import DatePart
  from more_itertools import is_sorted
  from typing_extensions import override
  from metricflow.specs.patterns.spec_pattern import SpecPattern
  from metricflow.specs.specs import InstanceSpec, InstanceSpecSet, LinkableInstanceSpec
label_desc: Use image node_id 1 for calling the EntityLinkPattern obj's underlying member method code with example usage: obj.match(candidate_specs) and returns: matching_specs