Is there a python way to close/collapse all expanded parameters?

Is there a python way to close/collapse all expanded parameters? I mean those parameters that have been opened to access the parameter modes.

thx!

Not currently. Curious what you need it for.

Just for automatic parameter cleanup of a tox file before releasing it .

And more Importantly, is here maybe a (hidden) way to lock a parameter, so that it can’t be expanded and therefore it’s mode can’t be changed via the parameter COMP ?

Haha definitely not. Both of these are good RFEs though.