Get and Set View Range - Problems with some settings

Found this amazing node from GeniusLoci:

Now i would like to edit the python code to set the viewrange level to the one i give as input:

I tried to add the following, it doesn´t work because i don´t understand python…

The code i need is in this thread: