#NEWLINE# def _push_to_remotes( self , hosts_to_states ) : #NEWLINE# #INDENT# 'Sends state updates to remote servers.\n\n        Args:\n            hosts_to_states (dict): Mapping `server_name` -> `[UserPresenceState]`\n        ' #NEWLINE# now = self . clock . time_msec ( ) #NEWLINE# for ( host , states ) in hosts_to_states . items ( ) : #NEWLINE# #INDENT# self . federation . send_edu ( destination = host , edu_type = 'm.presence' , content = { #NEWLINE# #INDENT# 'push' : [ _format_user_presence_state ( now , now ) for state in states ] , #NEWLINE# #UNINDENT# } )