#NEWLINE# def cookiejar_from_dict( cookie_dict ) : #NEWLINE# #INDENT# 'Returns a CookieJar from a key/value dictionary.\n\n    :param cookie_dict: Dict of key/values to insert into CookieJar.\n    ' #NEWLINE# if isinstance ( cookie_dict , cookielib . CookieJar ) : #NEWLINE# #INDENT# return cookie_dict #NEWLINE# #UNINDENT# cj = cookielib . CookieJar ( ) #NEWLINE# cj = add_dict_to_cookiejar ( cj , cookie_dict ) #NEWLINE# return cj