add minimum cut python code