Can't find the way to change this node into a python script

you can consult this topic, should meet your expectations

edit

edit: with Mr. Nick’s script and additional explanations on the modification according to the Python Engine Used (the names of the code blocks are important)

Cordially
christian.stan