Update undirected_partitioning.py