Almost working properly, failing test case #4
Tests added
Proper handling of nodes with duplicate labels
Selecting next best unused edge in a proper way