class_docstr: Resolves inputs to a query (e.g. metrics, group by items into concrete specs.
class_docstr_tok: ["Resolves","inputs","to","a","query","(","e.g",".","metrics",",","group","by","items","into","concrete","specs","."]
code: def _resolve_metric_inputs(
      self,
      metric_inputs: Sequence[ResolverInputForMetric],
      query_resolution_path: MetricFlowQueryResolutionPath,
  ) -> ResolveMetricsResult:
      # Build a list of metrics that are available from the manifest.
      available_metric_specs = tuple(
          MetricSpec.from_reference(metric_reference)
          for metric_reference in self._manifest_lookup.metric_lookup.metric_references
      )
      metric_specs: List[MetricSpec] = []
      input_to_issue_set_mapping_items: List[
          InputToIssueSetMappingItem
      ] = []
  
      # Find the metric that matches the metric pattern from the input.
      for metric_input in metric_inputs:
          matching_specs = metric_input.spec_pattern.match(
              available_metric_specs
          )
          if len(matching_specs) != 1:
              suggestion_generator = QueryItemSuggestionGenerator(
                  input_naming_scheme=MetricNamingScheme(),
                  input_str=str(metric_input.input_obj),
                  candidate_filters=(),
              )
              metric_suggestions = (
                  suggestion_generator.input_suggestions(
                      candidate_specs=available_metric_specs
                  )
              )
              input_to_issue_set_mapping_items.append(
                  InputToIssueSetMappingItem(
                      resolver_input=metric_input,
                      issue_set=MetricFlowQueryResolutionIssueSet.from_issue(
                          InvalidMetricIssue.from_parameters(
                              metric_suggestions=metric_suggestions,
                              query_resolution_path=query_resolution_path,
                          )
                      ),
                  )
              )
          else:
              metric_specs.extend(matching_specs)
  
      return ResolveMetricsResult(
          metric_specs=tuple(metric_specs),
          input_to_issue_set_mapping=InputToIssueSetMapping(
              items=tuple(input_to_issue_set_mapping_items)
          ),
      )
  
imports: from __future__ import annotations
  import logging
  from dataclasses import dataclass
  from typing import List, Optional, Sequence, Tuple
  from dbt_semantic_interfaces.references import MetricReference
  from metricflow.dag.dag_to_text import dag_as_text
  from metricflow.mf_logging.pretty_print import mf_pformat
  from metricflow.mf_logging.runtime import log_runtime
  from metricflow.model.semantic_manifest_lookup import SemanticManifestLookup
  from metricflow.naming.metric_scheme import MetricNamingScheme
  from metricflow.query.group_by_item.filter_spec_resolution.filter_pattern_factory import WhereFilterPatternFactory
  from metricflow.query.group_by_item.filter_spec_resolution.filter_spec_lookup import FilterSpecResolutionLookUp
  from metricflow.query.group_by_item.filter_spec_resolution.filter_spec_resolver import WhereFilterSpecResolver
  from metricflow.query.group_by_item.group_by_item_resolver import GroupByItemResolution, GroupByItemResolver
  from metricflow.query.group_by_item.resolution_dag.dag import GroupByItemResolutionDag
  from metricflow.query.group_by_item.resolution_dag.dag_builder import GroupByItemResolutionDagBuilder
  from metricflow.query.group_by_item.resolution_dag.resolution_nodes.query_resolution_node import QueryGroupByItemResolutionNode
  from metricflow.query.group_by_item.resolution_path import MetricFlowQueryResolutionPath
  from metricflow.query.issues.issues_base import MetricFlowQueryResolutionIssueSet
  from metricflow.query.issues.parsing.invalid_limit import InvalidLimitIssue
  from metricflow.query.issues.parsing.invalid_metric import InvalidMetricIssue
  from metricflow.query.issues.parsing.invalid_min_max_only import InvalidMinMaxOnlyIssue
  from metricflow.query.issues.parsing.invalid_order import InvalidOrderByItemIssue
  from metricflow.query.query_resolution import InputToIssueSetMapping, InputToIssueSetMappingItem, MetricFlowQueryResolution
  from metricflow.query.resolver_inputs.query_resolver_inputs import ResolverInputForGroupByItem, ResolverInputForLimit, ResolverInputForMetric, ResolverInputForMinMaxOnly, ResolverInputForOrderByItem, ResolverInputForQuery, ResolverInputForQueryLevelWhereFilterIntersection, ResolverInputForWhereFilterIntersection
  from metricflow.query.suggestion_generator import QueryItemSuggestionGenerator
  from metricflow.query.validation_rules.query_validator import PostResolutionQueryValidator
  from metricflow.specs.patterns.match_list_pattern import MatchListSpecPattern
  from metricflow.specs.specs import InstanceSpec, LinkableInstanceSpec, LinkableSpecSet, MetricFlowQuerySpec, MetricSpec, OrderBySpec
label_desc: Use image node_id 3 for calling the MetricFlowQueryResolver obj's underlying member method code with example usage: obj._resolve_metric_inputs(metric_inputs, query_resolution_path) and returns: ResolveMetricsResult