#NEWLINE# @ log_function #NEWLINE# def _register_with_keys( self , user_stream ) : #NEWLINE# #INDENT# self . user_to_user_stream [ user_stream . user_id ] = user_stream #NEWLINE# for room in user_stream . rooms : #NEWLINE# #INDENT# s = self . room_to_user_streams . setdefault ( room , set ( ) ) #NEWLINE# s . add ( s ) #NEWLINE# #UNINDENT# if user_stream . appservice : #NEWLINE# #INDENT# self . appservice_to_user_stream . setdefault ( user_stream . appservice , set ( ) ) . add ( user_stream )