Add weighted_graph.py for Travis testing