code: def test_stop_at_internal_node_if_trail_stops() -> None:
      """Test that if the signal trail stops at an internal node the solver will return that node instead of going deeper."""
      signals = [
          InferenceSignal(
              column=column,
              type_node=InferenceSignalType.ID.UNKNOWN,
              reason="KEY",
              confidence=InferenceSignalConfidence.HIGH,
              only_applies_to_parent=False,
          ),
          InferenceSignal(
              column=column,
              type_node=InferenceSignalType.ID.UNIQUE,
              reason="UNIQUE",
              confidence=InferenceSignalConfidence.HIGH,
              only_applies_to_parent=False,
          ),
      ]
  
      result = solver.solve_column(column, signals)
  
      # should not progress further into the tree and assume it's PRIMARY
      assert result.type_node == InferenceSignalType.ID.UNIQUE
      assert (
          "KEY" in result.reasons[0] and "UNIQUE" in result.reasons[1]
      )
  
file_path: metricflow/metricflow/test/inference/solver/test_weighted_tree.py
imports: from __future__ import annotations
  from metricflow.dataflow.sql_column import SqlColumn
  from metricflow.inference.models import InferenceSignal, InferenceSignalConfidence, InferenceSignalType
  from metricflow.inference.solver.weighted_tree import WeightedTypeTreeInferenceSolver
label_desc: Use image node_id 6 for calling a global function with example usage: test_stop_at_internal_node_if_trail_stops() without return types