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

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

    def value_attr(value, context, **_params):
        value = getattr(value, attr_name)
        return _attr(value)

    return value_attr