async def adelete_last_message(self, key: str) -> Optional[ChatMessage]:
        """
        Delete last message for a key asynchronously.

        Args:
            key: Key to delete last message for

        """
        # Find the last message
        last_msg_doc = await self._async_collection.find_one(
            {"session_id": key}, sort=[("index", -1)]
        )

        if last_msg_doc is None:
            return None

        # Delete the last message
        await self._async_collection.delete_one({"_id": last_msg_doc["_id"]})

        return _dict_to_message(last_msg_doc["message"])

        Delete last message for a key asynchronously.

        Args:
            key: Key to delete last message for

        
llama-index-integrations/storage/chat_store/llama-index-storage-chat-store-mongo/llama_index/storage/chat_store/mongo/base.py