clarifying questions:
-- Is "the nodes list being rebuilt for each node" happening by calling "graph.nodes()" in each iteration?
-- When is the whole graph being copied?