How to convert adjacency matrix to edge_index format?

I found a way to do it:

Hope it helps!