async def _analyze_database_schemas(
        self, client: httpx.AsyncClient, databases: List[dict]
    ) -> Dict[str, dict]:
        """Analyze database schemas and return detailed database information."""
        logger.info("Phase 2: Analyzing database schemas")

        database_schemas = {}

        for database in databases:
            database_id = database["id"]
            if database_id in self._processed_databases:
                continue

            try:
                logger.info(f"Analyzing database schema: {database_id}")
                schema = await self._get_with_auth(
                    client, f"https://api.notion.com/v1/databases/{database_id}"
                )
                database_schemas[database_id] = schema
                self._processed_databases.add(database_id)

            except Exception as e:
                logger.error(f"Error analyzing database {database_id}: {str(e)}")
                continue

        logger.info(f"Analyzed {len(database_schemas)} database schemas")
        return database_schemas
Analyze database schemas and return detailed database information.
backend/airweave/platform/sources/notion.py