def users(store):
user_objs = list(store.users())<EOL>total_events = store.user_events().count()<EOL>for user_obj in user_objs:<EOL><INDENT>if user_obj.get('<STR_LIT>'):<EOL><INDENT>user_obj['<STR_LIT>'] = [store.institute(inst_id) for inst_id in user_obj.get('<STR_LIT>')]<EOL><DEDENT>else:<EOL><INDENT>user_obj['<STR_LIT>'] = []<EOL><DEDENT>user_obj['<STR_LIT>'] = store.user_events(user_obj).count()<EOL>user_obj['<STR_LIT>'] = event_rank(user_obj['<STR_LIT>'])<EOL><DEDENT>return dict(<EOL>users=sorted(user_objs, key=lambda user: -user['<STR_LIT>']),<EOL>total_events=total_events,<EOL>)<EOL>
Display a list of all users and which institutes they belong to.