If you try calling your printRAS function with the node as a parameter you can see position is not defined. Also if you do use help(F_node.GetNthFiducialPosition) you can see that GetNthFiducialPosition is deprecated and you should use GetNthControlPointPosition instead.