

def subscribe_users(users, dry=True):
    serialized = [serialize_user(serialized) for user in users]
    m = mailchimp_utils.get_mailchimp_api()
    list_id = mailchimp_utils.get_list_id_from_name(list_name=GENERAL_LIST)
    logger.info('Subscribing {0} users to {1}...'.format(len(users), GENERAL_LIST))
    if (not dry):
        subscribe_info = m.lists.batch_subscribe(id=list_id, batch=serialized, double_optin=False, update_existing=True)
        logger.info('{n} users subscribed'.format(n=subscribe_info['add_count']))

dataset/ETHPy150Open CenterForOpenScience/osf.io/scripts/sync_email.py subscribe_users/VarMisuse@19/24 `user`->`serialized`