def load_data(self, path: str, field: Optional[str] = None) -> List[Document]:
        """
        Load data from Firebase Realtime Database and convert it into documents.

        Args:
            path (str): Path to the data in the Firebase Realtime Database.
            field (str, Optional): Key to pick data from

        Returns:
            List[Document]: A list of documents.

        """
        try:
            from firebase_admin import db
        except ImportError:
            raise ImportError(
                "`firebase_admin` package not found, please run `pip install"
                " firebase-admin`"
            )

        ref = db.reference(path)
        data = ref.get()

        documents = []

        if isinstance(data, Dict):
            for key in data:
                entry = data[key]
                extra_info = {
                    "document_id": key,
                }
                if type(entry) is Dict and field in entry:
                    text = entry[field]
                else:
                    text = str(entry)

                document = Document(text=text, extra_info=extra_info)
                documents.append(document)
        elif isinstance(data, str):
            documents.append(Document(text=data))

        return documents

        Load data from Firebase Realtime Database and convert it into documents.

        Args:
            path (str): Path to the data in the Firebase Realtime Database.
            field (str, Optional): Key to pick data from

        Returns:
            List[Document]: A list of documents.

        
llama-index-integrations/readers/llama-index-readers-firebase-realtimedb/llama_index/readers/firebase_realtimedb/base.py