code: def test_complementary_signals_without_parent_signal() -> None:
      """Test that the solver won't follow the weight trail and take complementary signals into account if parent has no weight."""
      signals = [
          InferenceSignal(
              column=column,
              type_node=InferenceSignalType.DIMENSION.CATEGORICAL,
              reason="CATEG_DIM",
              confidence=InferenceSignalConfidence.MEDIUM,
              only_applies_to_parent=False,
          ),
          InferenceSignal(
              column=column,
              type_node=InferenceSignalType.ID.UNIQUE,
              reason="UNIQUE",
              confidence=InferenceSignalConfidence.VERY_HIGH,
              only_applies_to_parent=True,
          ),
          InferenceSignal(
              column=column,
              type_node=InferenceSignalType.ID.PRIMARY,
              reason="PRIMARY",
              confidence=InferenceSignalConfidence.VERY_HIGH,
              only_applies_to_parent=True,
          ),
      ]
  
      result = solver.solve_column(column, signals)
  
      assert (
          result.type_node == InferenceSignalType.DIMENSION.CATEGORICAL
      )
      assert "CATEG_DIM" in result.reasons[0]
  
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 4 for calling a global function with example usage: test_complementary_signals_without_parent_signal() without return types