def get_all_node_subscriptions(user, node, user_subscriptions=None):
    if not user_subscriptions:
        user_subscriptions = get_all_user_subscriptions(user)
    for subscription in user_subscriptions:
        if subscription and subscription.owner == node:
            yield subscription
Get all Subscription objects for a node that the user is subscribed to
dataset/ETHPy150Open CenterForOpenScience/osf.io/website/notifications/utils.py/get_all_node_subscriptions