def METHOD_NAME(check_result):
    shape = (8,)
    x_data = np.random.randint(255, size=shape).astype("float32")
    y_data = np.random.randint(255, size=shape).astype("float32")
    inputs = {"x": x_data, "y": y_data}
    # Compile with an instance of the hooked target kind to demonstrate plumbing target attributes
    # into custom passes.
    host_target = tvm.target.Target("llvm")
    generic_target = tvm.target.Target("llvm", host=host_target)
    extern_codegen_target = tvm.target.Target(
        "example_target_hook -example_attribute=42", host=host_target
    )
    mod = tvm.relay.fromtext(
        """
            #[version = "0.0.5"]
            def @main(%x: Tensor[(8), float32], %y: Tensor[(8), float32]) -> Tensor[(8), float32] {
              @replace_add_with_subtract(%x, %y) * 2.0f
            }
            def @replace_add_with_subtract(%x: Tensor[(8), float32], %y: Tensor[(8), float32],
                                           Inline=1,
                                           Primitive=1,
                                           Compiler="example_target_hook",
                                           global_symbol="replace_add_with_subtract") -> Tensor[(8), float32] {
              %x + %y  // will be rewritten to TIR implementing %x - %y - 42.0f by custom pass
            }
        """
    )
    check_result(
        mod,
        inputs,
        (8,),
        (x_data - y_data - 42.0) * 2.0,
        target=[generic_target, extern_codegen_target],
    )