When we initialize from another graph, the max node id is different from .size, because we will add nodes out of order, such that we need two method for each
max node id (inclusive)