def METHOD_NAME(user_roles, selected_roles: set):
    current_roles = {r.name for r in user_roles if r.name in ROLES}
    added_roles = selected_roles - current_roles
    removed_roles = current_roles - selected_roles
    return added_roles, removed_roles