#NEWLINE# def createHeartbeatMessage( address , model , status ) : #NEWLINE# #INDENT# statuses = { #NEWLINE# #INDENT# 'STARTED' : HeartbeatMessage . STARTED , #NEWLINE# 'WAITING' : HeartbeatMessage . WAITING , #NEWLINE# 'WORKING' : HeartbeatMessage . WORKING , #NEWLINE# 'FINISHED' : HeartbeatMessage . FINISHED , #NEWLINE# #UNINDENT# } #NEWLINE# message = HeartbeatMessage ( ) #NEWLINE# message . address = address #NEWLINE# message . model = model #NEWLINE# message . status = status [ status ] #NEWLINE# return message