class_docstr: Assigns weights to each type in the column type tree and attempts to traverse it using a weight percentage threshold.
class_docstr_tok: ["Assigns","weights","to","each","type","in","the","column","type","tree","and","attempts","to","traverse","it","using","a","weight","percentage","threshold","."]
docstr: Get the cumulative weights dict for a list of signals.
docstr_tok: ["Get","the","cumulative","weights","dict","for","a","list","of","signals","."]
code: def _get_cumulative_weights(
      self, signals: List[InferenceSignal]
  ) -> Dict[InferenceSignalNode, int]:
      """Get the cumulative weights dict for a list of signals."""
      signals_by_type: Dict[
          InferenceSignalNode, List[InferenceSignal]
      ] = defaultdict(list)
      for signal in signals:
          signals_by_type[signal.type_node].append(signal)
  
      return self._get_cumulative_weights_for_root(
          root=InferenceSignalType.UNKNOWN,
          output_weights=defaultdict(int),
          output_parent_only_weights=defaultdict(int),
          signals_by_type=signals_by_type,
      )
  
file_path: metricflow/metricflow/inference/solver/weighted_tree.py
imports: from __future__ import annotations
  from collections import defaultdict
  from typing import Callable, Dict, List, Optional
  from metricflow.dataflow.sql_column import SqlColumn
  from metricflow.inference.models import InferenceResult, InferenceSignal, InferenceSignalConfidence, InferenceSignalNode, InferenceSignalType
  from metricflow.inference.solver.base import InferenceSolver
label_desc: Use image node_id 4 for calling the WeightedTypeTreeInferenceSolver obj's underlying member method code with example usage: obj._get_cumulative_weights(signals) and returns: self