async def generate_entities(self) -> AsyncGenerator[ChunkEntity, None]:
        """Generate all Google Drive entities.

        Yields entities in the following order:
          - Shared drives (Drive objects)
          - Files in each shared drive
          - Files in My Drive (corpora=user)
        """
        async with httpx.AsyncClient() as client:
            # For testing: count file entities yielded
            file_entity_count = 0
            # Testing flag - set to True to stop after first file entity
            stop_after_first_file = False

            # 1) Generate entities for shared drives
            async for drive_entity in self._generate_drive_entities(client):
                yield drive_entity

            # 2) For each shared drive, yield file entities
            #    We'll re-list drives in memory so we don't have to fetch them again
            drive_ids = []
            async for drive_obj in self._list_drives(client):
                drive_ids.append(drive_obj["id"])

            for drive_id in drive_ids:
                async for file_entity in self._generate_file_entities(
                    client,
                    corpora="drive",
                    include_all_drives=True,
                    drive_id=drive_id,
                    context=f"drive {drive_id}",
                ):
                    yield file_entity
                    file_entity_count += 1
                    if stop_after_first_file and file_entity_count >= 4:
                        logger.info("Stopping after first file entity for testing purposes")
                        return

            # 3) Finally, yield file entities for My Drive (corpora=user)
            # Only reach here if we didn't find any files in shared drives
            if not (stop_after_first_file and file_entity_count >= 4):
                async for mydrive_file_entity in self._generate_file_entities(
                    client, corpora="user", include_all_drives=False, context="MY DRIVE"
                ):
                    yield mydrive_file_entity
                    file_entity_count += 1
                    if stop_after_first_file and file_entity_count >= 4:
                        logger.info("Stopping after first file entity for testing purposes")
                        return
Generate all Google Drive entities.

        Yields entities in the following order:
          - Shared drives (Drive objects)
          - Files in each shared drive
          - Files in My Drive (corpora=user)
        
backend/airweave/platform/sources/google_drive.py