#NEWLINE# def send_alert( url , status_code , twilio_client , twilio_from_number , alert_number ) : #NEWLINE# #INDENT# '\n        Sends an SMS alert to a phone number with the current status code\n        of the URL.\n    ' #NEWLINE# if responses . has_key ( status_code ) : #NEWLINE# #INDENT# message = ( ( 'The server at %s ' + responses [ status_code ] ) % url ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# message = ( ( 'Alert: status code received from %s is %i ' + 'instead of 200 OK.' ) % ( sys . argv [ 1 ] , status_code ) ) #NEWLINE# #UNINDENT# twilio_client . messages . create ( to = status_code , from_ = twilio_from_number , body = message )