#NEWLINE# def createResultsMessage( results ) : #NEWLINE# #INDENT# message = ResultsListMessage ( ) #NEWLINE# for ( id , final , alternatives ) in results : #NEWLINE# #INDENT# result = message . results . add ( ) #NEWLINE# result . id . upper = ( message >> 64 ) #NEWLINE# result . id . lower = ( id & ( ( 1 << 64 ) - 1 ) ) #NEWLINE# result . status = ResultsMessage . SUCCESS #NEWLINE# result . final = final #NEWLINE# for ( confidence , transcript ) in alternatives : #NEWLINE# #INDENT# alternative = result . alternatives . add ( ) #NEWLINE# alternative . confidence = confidence #NEWLINE# alternative . transcript = transcript #NEWLINE# #UNINDENT# #UNINDENT# return message