code: def _get_cookies_as_dict():
      
      config = ConfigParser.SafeConfigParser()
      config.read(_config)
  
      if config.has_section('cookies'):
          cookie_dict = {}
          for option in config.options('cookies'):
              option_key = option.upper() if option == 'jsessionid' else option
              cookie_dict[option_key] = config.get('cookies', option)
  
          return cookie_dict
docs: Get cookies as a dict