graph.py: fix error with variable assignment.