#NEWLINE# def level_for_integer( cls , level ) : #NEWLINE# #INDENT# levels = cls . LEVELS #NEWLINE# if ( level < 0 ) : #NEWLINE# #INDENT# return levels [ 0 ] #NEWLINE# #UNINDENT# if ( level >= len ( levels ) ) : #NEWLINE# #INDENT# return levels [ ( - 1 ) ] #NEWLINE# #UNINDENT# return levels [ level ]