Found this among other things :) https://github.com/yast/yast-yast2/blob/master/library/general/src/modules/Mode.rb#L197