additional_metadata: Optional[Mapping] = None,
    ) -> List[Document]:
        """Load chunks for a document."""
        url = f"{self.api}/docsets/{docset_id}/documents/{document_id}/dgml"
        response = requests.request(
            "GET",
            url,
            headers={"Authorization": f"Bearer {self.access_token}"},
            data={},
        )
        if response.ok:
            return self._parse_dgml(
                content=response.content,
                document_name=document_name,
                additional_doc_metadata=additional_metadata,
            )
        else:
            raise Exception(
                f"Failed to download {url} (status: {response.status_code})"
            )
[docs]    def load(self) -> List[Document]:
        """Load documents."""
        chunks: List[Document] = []
        if self.access_token and self.docset_id:
            # Remote mode
            _document_details = self._document_details_for_docset_id(self.docset_id)
            if self.document_ids:
                _document_details = [
                    d for d in _document_details if d[ID_KEY] in self.document_ids
                ]
            _project_details = self._project_details_for_docset_id(self.docset_id)
            combined_project_metadata: Dict[str, Dict] = {}
            if _project_details and self.include_project_metadata_in_doc_metadata:
                # If there are any projects for this docset and the caller requested
                # project metadata, load it.
                for project in _project_details:
                    metadata = self._metadata_for_project(project)
                    for file_id in metadata:
                        if file_id not in combined_project_metadata:
                            combined_project_metadata[file_id] = metadata[file_id]
                        else: