Get and Set the Style of Pipe & Structure Labels

I would like to set the label styles for the pipes and structures in my model based on properties of the part - eg. structures with sumpdepth > 0 should have a different style than structures with no sump.

By now I have mastered getting and setting the style of pipe network parts themselves, but cannot find a way to get at the labels.