Added a helper function to get list of instance subgraphs