if(node1->details->num_resources < node2->details->num_resources) { return -1;  } else if(node1->details->num_resources > node2->details->num_resources) { return 1; }
gint sort_node_weight(gconstpointer a, gconstpointer b){	const node_t *node1 = (const node_t*)a;	const node_t *node2 = (const node_t*)b;	if(a == NULL) { return 1; }	if(b == NULL) { return -1; }		if(node1->weight > node2->weight) {		return -1;	}		if(node1->weight < node2->weight) {		return 1;	}	return 0;}