Creates a getter that will drop the current value
    and retrieve the action's attribute with the context key as name.

def action_getattr():
    """
    Creates a getter that will drop the current value
    and retrieve the action's attribute with the context key as name.
    """

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

    return action_getattr