def load_data(
        self,
        docset_id: str,
        document_ids: Optional[List[str]] = None,
        access_token: Optional[str] = None,
    ) -> List[Document]:
        """
        Load data the given docset_id in Docugami.

        Args:
            docset_id (str): Document set ID to load data for.
            document_ids (Optional[List[str]]): Optional list of document ids to load data for.
                                    If not specified, all documents from docset_id are loaded.

        """
        chunks: List[Document] = []

        if access_token:
            self.access_token = access_token

        if not self.access_token:
            raise Exception(
                "Please specify access token as argument or set the DOCUGAMI_API_KEY"
                " env var."
            )

        _document_details = self._document_details_for_docset_id(docset_id)
        if document_ids:
            _document_details = [
                d for d in _document_details if d[ID_KEY] in document_ids
            ]

        _project_details = self._project_details_for_docset_id(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:
                        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=docset_id,
                document_name=doc_name,
                additional_metadata=doc_metadata,
            )

        return chunks

        Load data the given docset_id in Docugami.

        Args:
            docset_id (str): Document set ID to load data for.
            document_ids (Optional[List[str]]): Optional list of document ids to load data for.
                                    If not specified, all documents from docset_id are loaded.

        
llama-index-integrations/readers/llama-index-readers-docugami/llama_index/readers/docugami/base.py