It refactor the graph function into the grapher.py file.