#NEWLINE# @ classmethod #NEWLINE# def CreateUnsubscribeCookie( cls , user_id , email_type ) : #NEWLINE# #INDENT# 'Create a user unsubscribe cookie that is passed as an argument to the unsubscribe handler,\n    and which proves control of the given user id.\n    ' #NEWLINE# unsubscribe_dict = { #NEWLINE# #INDENT# 'user_id' : user_id , #NEWLINE# 'email_type' : email_type , #NEWLINE# #UNINDENT# } #NEWLINE# return web . create_signed_value ( secrets . GetSecret ( 'invite_signing' ) , 'unsubscribe' , json . dumps ( unsubscribe_dict ) )