Calculating Min Cuts (# of cuts to split a graph into 2 connected components) in Python with Karger's algorithm