def METHOD_NAME(expression, expected_log, expected_output, caplog):
    jexl = JEXL()
    def sub_expr(val):
        return jexl.evaluate(val)
    jexl.add_transform("sub_expr", sub_expr)
    assert jexl.evaluate(expression) == expected_output
    assert caplog.messages == expected_log