def action_setattr():
    """
    Creates a setter that will set the action attribute with context's key
    for name to the current value.
    """

    def action_setattr(value, context, **_params):
        setattr(context["action"], context["key"], value)
        return _attr()

    return action_setattr