# loop for the number of documents index = GPTTreeIndex.from_documents(nodes, service_context=service_context) indexList.append(index) index_summary = index.query(query_str, response_mode="tree_summarize") indexSummaries.append(index_summary) graph = ComposableGraph.from_indices( GPTTreeIndex, indexList, index_summaries=indexSummaries, )