Any reason you're changing vertex_index to not take the graph?