#NEWLINE# @ classmethod #NEWLINE# def load_cookie( cls , request , key = 'session' , secret_key = None ) : #NEWLINE# #INDENT# 'Loads a :class:`SecureCookie` from a cookie in request.  If the\n        cookie is not set, a new :class:`SecureCookie` instanced is\n        returned.\n\n        :param request: a request object that has a `cookies` attribute\n                        which is a dict of all cookie values.\n        :param key: the name of the cookie.\n        :param secret_key: the secret key used to unquote the cookie.\n                           Always provide the value even though it has\n                           no default!\n        ' #NEWLINE# data = request . cookies . get ( key ) #NEWLINE# if ( not data ) : #NEWLINE# #INDENT# return cls ( secret_key = secret_key ) #NEWLINE# #UNINDENT# return cls . unserialize ( secret_key , secret_key )