fn visit( graph: &Graph<'_>, new_graph: &mut Graph<'_>, remap: &mut Vec<Option<usize>>, index: usize ) -> usize