combined_project_metadata[file_id] = metadata[file_id]
                        else:
                            combined_project_metadata[file_id].update(metadata[file_id])
            for doc in _document_details:
                doc_id = doc[ID_KEY]
                doc_name = doc.get(DOCUMENT_NAME_KEY)
                doc_metadata = combined_project_metadata.get(doc_id)
                chunks += self._load_chunks_for_document(
                    document_id=doc_id,
                    docset_id=self.docset_id,
                    document_name=doc_name,
                    additional_metadata=doc_metadata,
                )
        elif self.file_paths:
            # Local mode (for integration testing, or pre-downloaded XML)
            for path in self.file_paths:
                path = Path(path)
                with open(path, "rb") as file:
                    chunks += self._parse_dgml(
                        content=file.read(),
                        document_name=path.name,
                    )
        return chunks