Nodal areas for ANSYS mechanical and LS Dyna post processing

Hello,
I need to do nodal summation of certain result outputs like stress for a selected - shell - layered section (layer 4). In APDL for mechanical code like below works with arnode() function. How can I do this as a python snippet? I want to process LS dyna results and cannot use APDL script.

*DO, i, 1, nsel_nodes
nidi = NODE_IDs(i)
shell,top ! TOP of layer
layer,4 ! layer 4
*GET, prin1_val, NODE, nidi, S, 1 ! 1st principal stress
area_val=arnode(nidi) ! nodal area

Best
Hrishi