def _get_next_nodes(self, node: Union[TaskNode, DecisionFunc, DecisionLLM]) -> List[Union[TaskNode, DecisionFunc, DecisionLLM]]:
        """
        Gets the nodes that come after the given node.
        
        Args:
            node: The node to find successors for
            
        Returns:
            List of successor nodes
        """
        next_nodes = []
        
        # Check edges dictionary
        if node.id in self.edges:
            next_ids = self.edges[node.id]
            for next_id in next_ids:
                for n in self.nodes:
                    if n.id == next_id:
                        next_nodes.append(n)
        
        # If it's a TaskNode, also check its next_nodes attribute
        if isinstance(node, TaskNode):
            for next_node in node.next_nodes:
                if next_node not in next_nodes:  # Avoid duplicates
                    next_nodes.append(next_node)
        
        return next_nodes

        Gets the nodes that come after the given node.
        
        Args:
            node: The node to find successors for
            
        Returns:
            List of successor nodes
        
src/upsonic/client/graph.py