How to access the threshold slider in volume rendering module through python?

Hello, I would like to know how to access the threshold slider in volume rendering module through python. By changing the threshold values in the code will change the upper and lower limits of the slider. The scalar opacity mapping should shows step function in the graph.

The general guidelines are here:

https://slicer.readthedocs.io/en/latest/developer_guide/python_faq.html#how-to-find-a-python-function-for-any-slicer-features

Shifting the transfer functions like the Shift slider does it in Volume Rendering module is a very finicky, unstable operation. The Volume Rendering module must be very general-purpose, so we don’t have much options. However, in your own module I would recommend to directly set the transfer function you want (similarly how it is done for example in Colorize volume module).