class_docstr: Visitor that runs the validation rule when it visits a metric.
class_docstr_tok: ["Visitor","that","runs","the","validation","rule","when","it","visits","a","metric","."]
code: def visit_metric_node(
      self, node: MetricGroupByItemResolutionNode
  ) -> MetricFlowQueryResolutionIssueSet:
      with self._path_from_start_node_tracker.track_node_visit(
          node
      ) as current_traversal_path:
          issue_sets_to_merge = [
              parent_node.accept(self)
              for parent_node in node.parent_nodes
          ]
  
          for validation_rule in self._validation_rules:
              issue_sets_to_merge.append(
                  validation_rule.validate_metric_in_resolution_dag(
                      metric_reference=node.metric_reference,
                      resolver_input_for_query=self._resolver_input_for_query,
                      resolution_path=current_traversal_path,
                  )
              )
  
          return MetricFlowQueryResolutionIssueSet.merge_iterable(
              issue_sets_to_merge
          )
  
imports: from __future__ import annotations
  from typing import Sequence
  from typing_extensions import override
  from metricflow.model.semantic_manifest_lookup import SemanticManifestLookup
  from metricflow.query.group_by_item.candidate_push_down.push_down_visitor import DagTraversalPathTracker
  from metricflow.query.group_by_item.resolution_dag.dag import GroupByItemResolutionDag
  from metricflow.query.group_by_item.resolution_dag.resolution_nodes.base_node import GroupByItemResolutionNode, 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.issues.issues_base import MetricFlowQueryResolutionIssueSet
  from metricflow.query.resolver_inputs.query_resolver_inputs import ResolverInputForQuery
  from metricflow.query.validation_rules.base_validation_rule import PostResolutionQueryValidationRule
  from metricflow.query.validation_rules.duplicate_metric import DuplicateMetricValidationRule
  from metricflow.query.validation_rules.metric_time_requirements import MetricTimeQueryValidationRule
label_desc: Use image node_id 4 for calling the _PostResolutionQueryValidationVisitor obj's underlying member method code with example usage: obj.visit_metric_node(node) and returns: MetricFlowQueryResolutionIssueSet