#NEWLINE# def get_message( messages , message_name , part_name ) : #NEWLINE# #INDENT# if part_name : #NEWLINE# #INDENT# return messages . get ( ( message , part_name ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# for ( ( message_name_key , part_name_key ) , message ) in messages . items ( ) : #NEWLINE# #INDENT# if ( message_name_key == message_name ) : #NEWLINE# #INDENT# return message