def get_output_nodes(node, cook=True):
    """
    Get output nodes of node.

    Args:
        node (NodeGraphQt.BaseNode).
        cook (bool): call this function for cook node.
    Returns:
        list[NodeGraphQt.BaseNode].
    """

    nodes = {}
    for p in node.output_ports():
        for cp in p.connected_ports():
            n = cp.node()
            if cook and n.has_property('graph_rect'):
                n.mark_node_to_be_cooked(cp)
            nodes[n.id] = n
    return list(nodes.values())