def value_get(method_name):
    """
    Creates a getter that will call value's method with specified name
    using the context's key as first argument.
    @param method_name: the name of a method belonging to the value.
    @type method_name: str
    """

    def value_get(value, context, **_params):
        method = getattr(value, method_name)
        return _get(method, context["key"], (), {})

    return value_get
Creates a getter that will call value's method with specified name
    using the context's key as first argument.
    @param method_name: the name of a method belonging to the value.
    @type method_name: str