結果 : how to create a weighted graph in python