I want to transform a directed graph, something like this:
Where some nodes are not always connected to each other (without arcs)
I need to transform this to