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

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

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