code: 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
docs: Returns a CookieJar from a key/value dictionary.
  
      :param cookie_dict: Dict of key/values to insert into CookieJar.