Messing around with networkx module