Adjust volume rendering transfer function in Python

This function works for me, please see it as example:

For the record, this is the topic referred to above: