def next_node_of_edge(node, edge):
    """
    Return the node of the edge that is not the input node.
    
    :param node: current node
    :type node: Node object
    :param edge: current edge
    :type edge: Edge object
    
    :return: next node of the edge
    :rtype: Node object
    """
    # If the input node is the start node of the edge, return the end node
    if edge.node_start.id_node == node.id_node:
        return edge.node_end
    
    # If the input node is the end node of the edge, return the start node
    if edge.node_end.id_node == node.id_node:
        return edge.node_start