#NEWLINE# def convert_to_G( self , word ) : #NEWLINE# #INDENT# "\n    Given a size such as '2333M', return the converted value in G\n    " #NEWLINE# value = 0.0 #NEWLINE# if ( ( word [ ( - 1 ) ] == 'G' ) or ( word [ ( - 1 ) ] == 'g' ) ) : #NEWLINE# #INDENT# value = float ( word [ : ( - 1 ) ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( word [ ( - 1 ) ] == 'M' ) or ( word [ ( - 1 ) ] == 'm' ) ) : #NEWLINE# #INDENT# value = ( float ( word [ : ( - 1 ) ] ) / 1000.0 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( word [ ( - 1 ) ] == 'K' ) or ( word [ ( - 1 ) ] == 'k' ) ) : #NEWLINE# #INDENT# value = ( ( float ( word [ : ( - 1 ) ] ) / 1000.0 ) / 1000.0 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# value = ( ( ( float ( word ) / 1000.0 ) / 1000.0 ) / 1000.0 ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return str ( value )