pub fn path_weight( graph: &Graph, path: &[&str], weight_attr: &str, ) -> Option<f64>
Compute the weight of a path given edge weights. Matches networkx.path_weight(G, path, weight).
networkx.path_weight(G, path, weight)