def METHOD_NAME():
    """Test that when an operation already has a LUT, we don't overwrite that LUT"""
    ifm = relay.var("x", shape=(1, 8, 8, 4), dtype="int8")
    lut1 = relay.const([i for i in range(256)], dtype="int8")
    lut2 = relay.const([i for i in reversed(range(256))], dtype="int8")
    def before():
        conv1 = infra.make_ethosu_conv2d(ifm, 4, 4, (3, 3), (1, 1), (1, 1), (1, 1))
        id1 = infra.make_ethosu_identity(conv1, lut=lut1, activation="TANH")
        id2 = infra.make_ethosu_identity(id1, lut=lut2, activation="TANH")
        func = relay.Function(relay.analysis.free_vars(id2), id2)
        func = func.with_attr("Compiler", "ethos-u")
        mod = tvm.IRModule.from_expr(func)
        return mod
    def after():
        conv1 = infra.make_ethosu_conv2d(
            ifm, 4, 4, (3, 3), (1, 1), (1, 1), (1, 1), lut=lut1, activation="TANH"
        )
        id2 = infra.make_ethosu_identity(conv1, lut=lut2, activation="TANH")
        func = relay.Function(relay.analysis.free_vars(id2), id2)
        func = func.with_attr("Compiler", "ethos-u")
        mod = tvm.IRModule.from_expr(func)
        mod = relay.transform.InferType()(mod)
        return mod
    mod = LUTsOptimizer()(before())
    mod = relay.transform.InferType()(mod)
    assert tvm.ir.structural_equal(mod, after())