invert_selection function

Invert selection of nodes or edges in a graph