def parse_cookie(cookie):
    """ Parse cookie string and return a dictionary
        where key is a name of the cookie and value
        is cookie value.
    """
    return cookie and dict([pair.split('=', 1)
                            for pair in cookie.split('; ')]) or {}