From DAZ Studio 4.11.0.36 (2017) and higher there is an on/off setting in Parameters called "Visible in Viewport". This removes the wireframe of a light and a light's ray-indicators in the Viewport, but does not turn off the light in the scene. This also works the same for cameras.
I now wish to bodge together a script that toggles this visibility on-and-off, for all lights and cameras in a scene, with one click.
But I am a Python and not a Daz scripter. So initially I'm asking: is the official template script for 'node visibility toggle' (linked below) a good starting point for this? Also, does "Visible in Viewport" need to be referenced in any special way or have a special name in a Daz script?