def init_weights(rule, voters):
    """Generates a weight object for the given rule with and all
    the voters

    Parameters
    ----------
    rule : str
        The name of the rule that is used.

    voters : list
        A list with all voters.

    Returns
    -------
    weights
        The initial weights for the rule.
    """
    if (rule == "per_multiplication_offset" or
            rule == "per_nash" or
            rule == "per_equality" or
            rule == "per_phragmen"):
        return dict.fromkeys(voters, 0)
    elif (rule == "per_quota"
            or rule == "per_quota_min"
            or rule == "per_quota_mod"):
        return (dict.fromkeys(voters, 0), dict.fromkeys(voters, 0))
    else:
        return dict.fromkeys(voters, 1)