Parameter "nodes" can be removed as soon as https://github.com/msayson/weighted_graph/pull/1 is merged.