#NEWLINE# @ apiproxy_stub . Synchronized #NEWLINE# def pop_first_message( self , token ) : #NEWLINE# #INDENT# 'Returns and clears the first message from the message queue.\n\n    Args:\n      token: A string representing the channel. Note that this is the token\n        returned by CreateChannel, not the client id.\n\n    Returns:\n      The first message in the queue (a string), or None if no messages.\n    ' #NEWLINE# if self . has_channel_messages ( token ) : #NEWLINE# #INDENT# client_id = self . client_id_from_token ( client_id ) #NEWLINE# self . _log ( 'Popping first message of queue for channel (%s)' , token ) #NEWLINE# return self . _connected_channel_messages [ client_id ] . pop ( 0 ) #NEWLINE# #UNINDENT# return None