Implement CreateGraph().