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

def value_getattr():
    """
    Creates a getter that will retrieve the value's attribute
    with the context key as name.
    """

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

    return source_getattr