Regarding coloring edges in GAT

I have been reading the post (https://www.dgl.ai/blog/2019/02/17/gat.html) that introduces the GAT model.
I am really impressed by the figure that visulizes the edges in different clours (see below).

Could anyone provide the code for like this edges visualization?

Any help would be much appreciated.

See if this helps: How to plot the attention weights...?

Thank you Mufei. Your information is quite helpful. I will be testing the code.

Hi Mufei, can you let me know which layout you were using when you drew the figure ?
Hope to hear from you soon. Any help would be much appreciated.

circular or spring layout in networkx should work.