langchain/chains/combine_documents/map_reduce.py/MapReduceDocumentsChain/_collapse_chain
class MapReduceDocumentsChain:    def _collapse_chain(self) -> BaseCombineDocumentsChain:
        if self.collapse_document_chain is not None:
            return self.collapse_document_chain
        else:
            return self.combine_document_chain