#NEWLINE# @ property #NEWLINE# def user_id_to_groups( self ) : #NEWLINE# #INDENT# mapping = defaultdict ( set ) #NEWLINE# for group in self . case_sharing_groups : #NEWLINE# #INDENT# for user_id in group . users : #NEWLINE# #INDENT# mapping [ user_id ] . add ( group . get_id ) #NEWLINE# #UNINDENT# #UNINDENT# return mapping