#NEWLINE# def _set_id_attr( attrs , id_arg , name ) : #NEWLINE# #INDENT# if ( 'id_' in attrs ) : #NEWLINE# #INDENT# if ( id_arg is not NotGiven ) : #NEWLINE# #INDENT# raise TypeError ( "can't pass both 'id' and 'id_' args to helper" ) #NEWLINE# #UNINDENT# attrs [ 'id' ] = attrs . pop ( 'id_' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( id_arg is NotGiven ) : #NEWLINE# #INDENT# attrs [ 'id' ] = _make_safe_id_component ( name ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( id_arg is not None ) and ( id_arg != '' ) ) : #NEWLINE# #INDENT# attrs [ 'id' ] = id_arg