def find_subscription_type(subscription):
    subs_available = list(constants.USER_SUBSCRIPTIONS_AVAILABLE.keys())
    subs_available.extend(list(constants.NODE_SUBSCRIPTIONS_AVAILABLE.keys()))
    for available in subs_available:
        if available in subscription:
            return available
Find subscription type string within specific subscription.
dataset/ETHPy150Open CenterForOpenScience/osf.io/website/notifications/utils.py/find_subscription_type