Implement subgraphs.