Thanks Tamas, that sounds like a great idea. I'll test this ASAP. However, I am just struggling with creating a graph from a list of named vertex-pairs. So far I have always been using plain integer values starting with 0 which represent my vertex IDs...but now since I want to replace each barrier node V with two nodes VA and VB, I have created a list of named node-pairs like edge_list = [["v1","v2"],"v2","v3"],["v3","v4A"],["v4B","v5"],["v4A","v4B“]]. It seems that the igraph R libarry has such a function (
https://igraph.org/r/doc/graph_from_edgelist.html) that accepts a list of names. However, is there a corresponding function in the python igraph library?