NODE_DESC_IS_OUTPUT
bool output = NODE_DESC_IS_OUTPUT(&node_desc[id]);
NODE_DESC_IS_OUTPUT(&node_desc[i]) ?