Move graph.py out of tests package.