Deduplicate edges in small_graph.
Update flows to account for bidirectionality, and allocate flows per node instead of for the entire graph.