class_docstr: Visitor that resolves specs for all filters in a resolution DAG and builds a lookup.
  
  This visitor traverses the group-by-item resolution DAG and if there is a where filter associated with the node,
  this resolves (ambiguous) group-by-items that are specified in the filter. All resolutions are
  collected and returned in a lookup object.
class_docstr_tok: ["Visitor","that","resolves","specs","for","all","filters","in","a","resolution","DAG","and","builds","a","lookup",".","This","visitor","traverses","the","group-by-item","resolution","DAG","and","if","there","is","a","where","filter","associated","with","the","node",",","this","resolves","(","ambiguous",")","group-by-items","that","are","specified","in","the","filter",".","All","resolutions","are","collected","and","returned","in","a","lookup","object","."]
docstr: Return the filters used with a metric in the manifest.
  
  A derived metric definition can have a filter for an input metric, and we'll need to resolve that when the
  dataflow plan is built.
docstr_tok: ["Return","the","filters","used","with","a","metric","in","the","manifest",".","A","derived","metric","definition","can","have","a","filter","for","an","input","metric",",","and","we","'ll","need","to","resolve","that","when","the","dataflow","plan","is","built","."]
code: def _get_where_filters_at_metric_node(
      self, metric_node: MetricGroupByItemResolutionNode
  ) -> WhereFilterIntersection:
      """Return the filters used with a metric in the manifest.
  
      A derived metric definition can have a filter for an input metric, and we'll need to resolve that when the
      dataflow plan is built.
      """
      where_filters: List[WhereFilter] = []
      metric = self._manifest_lookup.metric_lookup.get_metric(
          metric_node.metric_reference
      )
  
      if metric.input_measures is not None:
          for input_measure in metric.input_measures:
              if input_measure.filter is not None:
                  where_filters.extend(
                      input_measure.filter.where_filters
                  )
  
      if metric.filter is not None:
          where_filters.extend(metric.filter.where_filters)
  
      # This is a metric that is an input metric for a derived metric. The derived metric is the child node of this
      # metric node.
      if metric_node.metric_input_location is not None:
          child_metric_input = (
              metric_node.metric_input_location.get_metric_input(
                  self._manifest_lookup.metric_lookup
              )
          )
          if child_metric_input.filter is not None:
              where_filters.extend(
                  child_metric_input.filter.where_filters
              )
  
      return PydanticWhereFilterIntersection(
          where_filters=where_filters
      )
  
imports: from __future__ import annotations
  import itertools
  import logging
  from typing import List, Sequence
  from dbt_semantic_interfaces.call_parameter_sets import FilterCallParameterSets
  from dbt_semantic_interfaces.implementations.filters.where_filter import PydanticWhereFilterIntersection
  from dbt_semantic_interfaces.protocols import WhereFilter, WhereFilterIntersection
  from typing_extensions import override
  from metricflow.mf_logging.runtime import log_runtime
  from metricflow.model.semantic_manifest_lookup import SemanticManifestLookup
  from metricflow.naming.object_builder_str import ObjectBuilderNameConverter
  from metricflow.query.group_by_item.candidate_push_down.push_down_visitor import DagTraversalPathTracker
  from metricflow.query.group_by_item.filter_spec_resolution.filter_location import WhereFilterLocation
  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 FilterSpecResolution, FilterSpecResolutionLookUp, NonParsableFilterResolution, PatternAssociationForWhereFilterGroupByItem, ResolvedSpecLookUpKey
  from metricflow.query.group_by_item.group_by_item_resolver import GroupByItemResolver
  from metricflow.query.group_by_item.resolution_dag.dag import GroupByItemResolutionDag, ResolutionDagSinkNode
  from metricflow.query.group_by_item.resolution_dag.resolution_nodes.base_node import GroupByItemResolutionNodeVisitor
  from metricflow.query.group_by_item.resolution_dag.resolution_nodes.measure_source_node import MeasureGroupByItemSourceNode
  from metricflow.query.group_by_item.resolution_dag.resolution_nodes.metric_resolution_node import MetricGroupByItemResolutionNode
  from metricflow.query.group_by_item.resolution_dag.resolution_nodes.no_metrics_query_source_node import NoMetricsGroupByItemSourceNode
  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.filter_spec_resolver.invalid_where import WhereFilterParsingIssue
  from metricflow.query.issues.issues_base import MetricFlowQueryResolutionIssueSet
label_desc: Use image node_id 8 for calling the _ResolveWhereFilterSpecVisitor obj's underlying member method code with example usage: obj._get_where_filters_at_metric_node(metric_node) and returns: PydanticWhereFilterIntersection