(user_es_query)
return sorted(users, key=lambda u: u['username_in_report'])
Accepts an instance of UserES and returns SimplifiedUserInfo dicts for the
    matching users, sorted by username.
Accepts an instance of UserES and returns SimplifiedUserInfo dicts for the
    matching users, sorted by username.
Accepts an instance of UserES and returns SimplifiedUserInfo dicts for the matching users sorted by username .
def get_simplified_users(user_es_query):
    """
    Accepts an instance of UserES and returns SimplifiedUserInfo dicts for the
    matching users, sorted by username.
    """
    users = user_es_query.fields(SimplifiedUserInfo.ES_FIELDS).run().hits
    users = list(map(_report_user_dict, users))
    return sorted(users, key=lambda u: u['username_in_report'])
def get_simplified_users ( user_es_query ) : users = user_es_query . fields ( SimplifiedUserInfo . ES_FIELDS ) . run ( ) . hits users = list ( map ( _report_user_dict , users ) ) return sorted ( users , key = lambda u : u [ 'username_in_report' ] )