async def add(
        self, data: Union[Document, List[Document]], dataset_name: str
    ) -> None:
        """
        Add data to the specified dataset.
        This data will later be processed and made into a knowledge graph.

        Args:
             data (Any): The data to be added to the graph.
             dataset_name (str): Name of the dataset or node set where the data will be added.

        """
        # Convert LlamaIndex Document type to text
        if isinstance(data, List) and len(data) > 0:
            data = [data.text for data in data if type(data) is Document]
        elif type(data) is Document:
            data = [data.text]

        await cognee.add(data, dataset_name)

        Add data to the specified dataset.
        This data will later be processed and made into a knowledge graph.

        Args:
             data (Any): The data to be added to the graph.
             dataset_name (str): Name of the dataset or node set where the data will be added.

        
llama-index-integrations/graph_rag/llama-index-graph-rag-cognee/llama_index/graph_rag/cognee/graph_rag.py