code: def convert_cookie_to_dict(cookie, keys_map=WEB_DRIVER_COOKIE_KEYS_MAP):
      
  
      cookie_dict = dict()
  
      for k in keys_map.keys():
          key = _to_unicode_if_str(keys_map[k])
          value = _to_unicode_if_str(getattr(cookie, k))
          cookie_dict[key] = value
  
      return cookie_dict
docs: Converts an instance of Cookie class from cookielib to a dict.
      The names of attributes can be changed according to keys_map:.
      For example, this method can be used to create a cookie which compatible with WebDriver format.
  
      :param cookie: Cookie instance received from requests/sessions using url2lib or requests libraries.
      :param keys_map: The dict to map cookie attributes for different schemas. By default WebDriver format is used.
      :return: