Moved the Graph class to graphs.py file.