Split the `remove-vertices'` implementation for different graph types