Sample codes of Network X (Python)