This commit implements the graph builder class