Buck converter netlist showing the use of a voltage-controlled switch
The same functionality can be implemented with the library approach.
I will try to convert this file to a python script soon.

Cheers,

GV