adding setNodeIndex for Training Context