async def _create_source_and_destination_nodes(
        self, source, source_connection, destinations, destination_connections, nodes
    ) -> Tuple[UUID, List[UUID]]:
        """Create source and destination nodes for the DAG."""
        source_node_id = uuid4()
        destination_node_ids = []

        # Add source node
        nodes.append(
            DagNodeCreate(
                id=source_node_id,
                type=NodeType.source,
                name=source.name,
                connection_id=source_connection.id,
            )
        )

        # Add destination nodes - create a unique ID for each destination
        for destination, destination_connection in zip(
            destinations, destination_connections, strict=True
        ):
            dest_node_id = uuid4()
            destination_node_ids.append(dest_node_id)

            nodes.append(
                DagNodeCreate(
                    id=dest_node_id,
                    type=NodeType.destination,
                    name=destination.name,
                    connection_id=destination_connection.id,
                )
            )

        return source_node_id, destination_node_ids
Create source and destination nodes for the DAG.
backend/airweave/core/dag_service.py