[graph-tool] Contracting all paths through components of hidden vertices