Duplicate remove_node call should be handled by finally

Before, there was a duplicate call to remove_node which should have been handled by a finally clause. Also added a test to verify that the size of the graph remains unchanged before and after the call to ```negative_edge_cycle()```