async def adelete_messages(self, key: str) -> Optional[List[ChatMessage]]:
        """Asynchronously delete all messages for a key."""
        chat_client = await self._atable_service_client.create_table_if_not_exists(
            self.chat_table_name
        )
        entities = chat_client.query_entities(f"PartitionKey eq '{key}'")
        all_entities = []
        async for entity in entities:
            all_entities.append(entity)

        await chat_client.submit_transaction(
            (TransactionOperation.DELETE, entity) for entity in all_entities
        )

        metadata_client = await self._atable_service_client.create_table_if_not_exists(
            self.metadata_table_name
        )
        await metadata_client.upsert_entity(
            self._get_default_metadata(key), UpdateMode.REPLACE
        )
Asynchronously delete all messages for a key.
llama-index-integrations/storage/chat_store/llama-index-storage-chat-store-azure/llama_index/storage/chat_store/azure/base.py