def set_user_info_cookie(response, request):
 cookie_settings = _get_cookie_settings(request)
 user_info_cookie_is_secure = request.is_secure()
 user_info = get_user_info_cookie_data(request)
 response.set_cookie(settings.EDXMKTG_USER_INFO_COOKIE_NAME.encode(u'utf-8'), json.dumps(user_info), secure=user_info_cookie_is_secure, **cookie_settings)

def set_user_info_cookie ( response , request ) : cookie_settings = _get_cookie_settings ( request ) user_info_cookie_is_secure = request . is_secure ( ) user_info = get_user_info_cookie_data ( request ) response . set_cookie ( settings . EDXMKTG_USER_INFO_COOKIE_NAME . encode ( u'utf-8' ) , json . dumps ( user_info ) , secure = user_info_cookie_is_secure , ** cookie_settings )
sets the user info cookie on the response .