def users_to_remove(source_event, source_node, new_node):
    removed_users = {key: [] for key in constants.NOTIFICATION_TYPES}
    if source_node == new_node:
        return removed_users
    old_sub = NotificationSubscription.load(to_subscription_key(source_node._id, source_event))
    old_node_sub = NotificationSubscription.load(to_subscription_key(source_node._id,
                                                                     '_'.join(source_event.split('_')[-2:])))
    if not old_sub and not old_node_sub:
        return removed_users
    for notification_type in constants.NOTIFICATION_TYPES:
        users = getattr(old_sub, notification_type, []) + getattr(old_node_sub, notification_type, [])
        subbed, removed_users[notification_type] = separate_users(new_node, users)
    return removed_users
Call the oauth service and obtain the access_token.
dataset/ETHPy150Open CenterForOpenScience/osf.io/website/notifications/utils.py/users_to_remove--crossover with--dataset/ETHPy150Open biicode/bii-server/user/oauth.py/OAuthService.handle_register_or_login