async def _process_all_entity_definitions(
        self,
        db,
        entity_definitions,
        processed_entity_ids,
        file_chunker,
        web_fetcher,
        source_node_id,
        destination_node_ids,
        nodes,
        edges,
    ):
        """Process all entity definitions and create corresponding nodes and edges."""
        for entity_definition_id, entity_data in entity_definitions.items():
            if entity_definition_id in processed_entity_ids:
                continue

            processed_entity_ids.add(entity_definition_id)
            entity_class = entity_data["entity_class"]
            entity_definition = entity_data["entity_definition"]

            # Handle file entities
            if issubclass(entity_class, FileEntity):
                destination_node_id = destination_node_ids[0] if destination_node_ids else None
                if not destination_node_id:
                    raise ValueError("No destination node ID available for file entity processing")

                await self._process_file_entity(
                    db=db,
                    entity_class=entity_class,
                    entity_definition=entity_definition,
                    file_chunker=file_chunker,
                    source_node_id=source_node_id,
                    destination_node_id=destination_node_id,
                    nodes=nodes,
                    edges=edges,
                    processed_entity_ids=processed_entity_ids,
                )
            # Handle web entities
            elif issubclass(entity_class, WebEntity):
                destination_node_id = destination_node_ids[0] if destination_node_ids else None
                if not destination_node_id:
                    raise ValueError("No destination node ID available for web entity processing")

                await self._process_web_entity(
                    db=db,
                    entity_class=entity_class,
                    entity_definition=entity_definition,
                    web_fetcher=web_fetcher,
                    file_chunker=file_chunker,
                    source_node_id=source_node_id,
                    destination_node_id=destination_node_id,
                    nodes=nodes,
                    edges=edges,
                    processed_entity_ids=processed_entity_ids,
                )
            # Handle regular entities
            else:
                await self._process_regular_entity(
                    entity_definition_id,
                    entity_definition,
                    source_node_id,
                    destination_node_ids,
                    nodes,
                    edges,
                )
Process all entity definitions and create corresponding nodes and edges.
backend/airweave/core/dag_service.py