Creates a setter that will call the model method with the context's
    key as first parameter and the value as second parameter.
    @param method_name: the name of a method belonging to the model.
    @type method_name: str

def model_set(method_name):
    """
    Creates a setter that will call the model method with the context's
    key as first parameter and the value as second parameter.
    @param method_name: the name of a method belonging to the model.
    @type method_name: str
    """

    def model_set(value, context, **_params):
        method = getattr(context["model"], method_name)
        return _set(method, context["key"], value, (), {})

    return model_set