code: def parse_cookie(header, charset='utf-8', errors='ignore'):
      
      cookie = _ExtendedCookie()
      if header:
          cookie.load(header)
      result = {}
  
      # decode to unicode and skip broken items.  Our extended morsel
      # and extended cookie will catch CookieErrors and convert them to
      # `None` items which we have to skip here.
      for key, value in cookie.iteritems():
          if value.value is not None:
              result[key] = unquote_header_value(value.value) \
                  .decode(charset, errors)
  
      return result
docs: Parse a cookie.
  
      :param header: the header to be used to parse the cookie.
      :param charset: the charset for the cookie values.
      :param errors: the error behavior for the charset decoding.