def key_value_parsing(s: str) -> dict:
    """
    key=value to dictionary parsing.
    Given a string of the form k_1=v_1&k_2=v_2,
    convert it to a dictionary.
    Best effort, skip malformed strings.

    :param s: The input string.
    :return: A dictionary from the input string.
    """
    assert s
    return {
        kv.split("=")[0]: kv.split("=")[1]
        for kv in s.split("&")
        if kv.count("=")
    }