def color_code_severity_widget(widget, name):
 for (option, color) in zip(widget, ['green', 'yellow', 'orange', 'red']):
  option[0].__setitem__('_style', ('background-color:%s;' % color))
  option[0][0].__setitem__('_name', name)
 return widget

def color_code_severity_widget ( widget , name ) : for ( option , color ) in zip ( widget , [ 'green' , 'yellow' , 'orange' , 'red' ] ) : option [ 0 ] . __setitem__ ( '_style' , ( 'background-color:%s;' % color ) ) option [ 0 ] [ 0 ] . __setitem__ ( '_name' , name ) return widget
utility function to colour-code severity options .