Segmentation node color and transparency through script

How to set segmentation node color and transparency through script ?

You can adjust display properties via the segmentation node’s display node. See examples in the script repository.