#NEWLINE# def _get_cur_mem( key , val ) : #NEWLINE# #INDENT# if ( key == 'memory' ) : #NEWLINE# #INDENT# cur_mem = key #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( key == 'jvm_opts' ) : #NEWLINE# #INDENT# cur_mem = val [ 1 ] . replace ( '-Xmx' , '' ) #NEWLINE# #UNINDENT# #UNINDENT# cur_val = int ( cur_mem [ : ( - 1 ) ] ) #NEWLINE# cur_mod = cur_mem [ ( - 1 ) : ] #NEWLINE# if ( cur_mod . lower ( ) == 'g' ) : #NEWLINE# #INDENT# cur_val = ( cur_val * 1000 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# assert ( cur_mod . lower ( ) == 'm' ) #NEWLINE# #UNINDENT# return ( cur_val , cur_mod )