class_docstr: Helps track the path traveled by a visitor through the nodes in a group-by-tem resolution DAG.
class_docstr_tok: ["Helps","track","the","path","traveled","by","a","visitor","through","the","nodes","in","a","group-by-tem","resolution","DAG","."]
docstr: Context manager used to wrap the visit calls.
  
  e.g.
  
      def visit_some_node(self, node) -> Result:
          with track_node_visit(node) as current_traversal_path:
              # current_traversal_path is the path from the start node to this node.
          # context manager removes this node from current_traversal_path so sibling branches don't include it
code: def track_node_visit(
      self, node: GroupByItemResolutionNode
  ) -> Iterator[MetricFlowQueryResolutionPath]:
      """Context manager used to wrap the visit calls.
  
      e.g.
  
          def visit_some_node(self, node) -> Result:
              with track_node_visit(node) as current_traversal_path:
                  # current_traversal_path is the path from the start node to this node.
              # context manager removes this node from current_traversal_path so sibling branches don't include it
      """
      self._current_path.append(node)
      yield MetricFlowQueryResolutionPath(tuple(self._current_path))
      self._current_path.pop(-1)
  
imports: from __future__ import annotations
  import logging
  from contextlib import contextmanager
  from dataclasses import dataclass
  from typing import Dict, Iterator, List, Optional, Sequence, Set, Tuple
  from dbt_semantic_interfaces.enum_extension import assert_values_exhausted
  from dbt_semantic_interfaces.type_enums import MetricType
  from typing_extensions import override
  from metricflow.mf_logging.formatting import indent
  from metricflow.mf_logging.pretty_print import mf_pformat, mf_pformat_many
  from metricflow.model.semantic_manifest_lookup import SemanticManifestLookup
  from metricflow.model.semantics.linkable_element_properties import LinkableElementProperties
  from metricflow.query.group_by_item.candidate_push_down.group_by_item_candidate import GroupByItemCandidateSet
  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.group_by_item.resolution_path import MetricFlowQueryResolutionPath
  from metricflow.query.issues.group_by_item_resolver.invalid_use_of_date_part import MetricExcludesDatePartIssue
  from metricflow.query.issues.group_by_item_resolver.no_common_items import NoCommonItemsInParents
  from metricflow.query.issues.group_by_item_resolver.no_matching_items_for_measure import NoMatchingItemsForMeasure
  from metricflow.query.issues.group_by_item_resolver.no_matching_items_for_no_metrics_query import NoMatchingItemsForNoMetricsQuery
  from metricflow.query.issues.issues_base import MetricFlowQueryResolutionIssueSet
  from metricflow.query.suggestion_generator import QueryItemSuggestionGenerator
  from metricflow.specs.patterns.base_time_grain import BaseTimeGrainPattern
  from metricflow.specs.patterns.none_date_part import NoneDatePartPattern
  from metricflow.specs.patterns.spec_pattern import SpecPattern
  from metricflow.specs.specs import InstanceSpecSet, LinkableInstanceSpec
label_desc: Use image node_id 2 for calling the DagTraversalPathTracker obj's underlying member method code with example usage: obj.track_node_visit(node) without return types