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_group_by_items_result(
      self,
      metric_references: Sequence[MetricReference],
      group_by_item_inputs: Sequence[ResolverInputForGroupByItem],
      filter_input: ResolverInputForQueryLevelWhereFilterIntersection,
  ) -> ResolveGroupByItemsResult:
      resolution_dag_builder = GroupByItemResolutionDagBuilder(
          manifest_lookup=self._manifest_lookup,
      )
      resolution_dag = resolution_dag_builder.build(
          metric_references=metric_references,
          where_filter_intersection=filter_input.where_filter_intersection,
      )
      logger.info(f"Resolution DAG is:\n{dag_as_text(resolution_dag)}")
  
      group_by_item_resolver = GroupByItemResolver(
          manifest_lookup=self._manifest_lookup,
          resolution_dag=resolution_dag,
      )
  
      valid_group_by_item_specs_for_querying = (
          group_by_item_resolver.resolve_available_items().specs
      )
  
      input_to_issue_set_mapping_items: List[
          InputToIssueSetMappingItem
      ] = []
      group_by_item_specs: List[LinkableInstanceSpec] = []
      for group_by_item_input in group_by_item_inputs:
          resolution = MetricFlowQueryResolver._resolve_group_by_item_input(
              group_by_item_resolver=group_by_item_resolver,
              group_by_item_input=group_by_item_input,
              valid_group_by_item_specs_for_querying=valid_group_by_item_specs_for_querying,
          )
          if resolution.issue_set.has_issues:
              input_to_issue_set_mapping_items.append(
                  InputToIssueSetMappingItem(
                      resolver_input=group_by_item_input,
                      issue_set=resolution.issue_set,
                  )
              )
          if resolution.spec is not None:
              group_by_item_specs.append(resolution.spec)
  
      return ResolveGroupByItemsResult(
          resolution_dag=resolution_dag,
          group_by_item_specs=tuple(group_by_item_specs),
          input_to_issue_set_mapping=InputToIssueSetMapping(
              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 4 for calling the MetricFlowQueryResolver obj's underlying member method code with example usage: obj._resolve_group_by_items_result(metric_references, group_by_item_inputs, filter_input) and returns: ResolveGroupByItemsResult