from datasets import Dataset from typing import Dict, List _COLLAB: List[Dict] = [] def add_collaboration_note(document: str, note: str) -> Dict: record = { "document": document, "note": note } _COLLAB.append(record) return record def get_collaboration_dataset() -> Dataset: if not _COLLAB: return Dataset.from_dict({"document": [], "note": []}) return Dataset.from_list(_COLLAB)