Creates a getter that will drop the current value
    and retrieve the model's attribute with specified name.
    @param attr_name: the name of an attribute belonging to the model.
    @type attr_name: str

def model_attr(attr_name):
    """
    Creates a getter that will drop the current value
    and retrieve the model's attribute with specified name.
    @param attr_name: the name of an attribute belonging to the model.
    @type attr_name: str
    """

    def model_attr(_value, context, **_params):
        value = getattr(context["model"], attr_name)
        return _attr(value)

    return model_attr