#NEWLINE# def get_all_node_subscriptions( user , node , user_subscriptions = None ) : #NEWLINE# #INDENT# ' Get all Subscription objects for a node that the user is subscribed to\n\n    :param user: modular odm User object\n    :param node: modular odm Node object\n    :param user_subscriptions: all Subscription objects that the user is subscribed to\n    :return: list of Subscription objects for a node that the user is subscribed to\n    ' #NEWLINE# if ( not user_subscriptions ) : #NEWLINE# #INDENT# user_subscriptions = get_all_user_subscriptions ( user ) #NEWLINE# #UNINDENT# for subscription in user_subscriptions : #NEWLINE# #INDENT# if ( node and ( subscription . owner == node ) ) : #NEWLINE# #INDENT# ( yield subscription )