def METHOD_NAME(logger, ctx, expr, value_name):
    _log(logger, "Evaluating {expr}".format(expr=expr))
    rc = ctx.EvaluateExpression(expr)
    err = rc.GetError()
    if err.Fail():
        _log(logger, "_EvalExpression failed: {err}".format(err=err))
        raise EvaluateError(err)
    _log(logger, "_EvalExpression success: {typename}".format(typename=rc.GetTypeName()))
    return rc