def user_with_role(user, role):
 return {'id': user.id, 'username': user.username, 'email': user.email, 'role': role}

def user_with_role ( user , role ) : return { 'id' : user . id , 'username' : user . username , 'email' : user . email , 'role' : role }
build user representation with attached role .