def cookiejar_from_dict(cookie_dict):

    # return cookiejar if one was passed in
    if isinstance(cookie_dict, cookielib.CookieJar):
        return cookie_dict

    # create cookiejar
    cj = cookielib.CookieJar()

    cj = add_dict_to_cookiejar(cj, cookie_dict)

    return cj
Returns a CookieJar from a key/value dictionary.
dataset/ETHPy150Open bububa/pyTOP/pyTOP/packages/requests/utils.py/cookiejar_from_dict