code: def test_fp8_compute_legalize(dtype, promote_dtype):
      before = get_before(dtype)
      expected = get_after_compute_legalize(dtype, promote_dtype)
      # run the transform twice to ensure we can afford to deal
      # with this repeative optimizations
      after = tvm.tir.transform.FP8ComputeLegalize(promote_dtype)(
          before
      )
      after = tvm.tir.transform.FP8ComputeLegalize(promote_dtype)(after)
      tvm.ir.assert_structural_equal(after, expected)
  
file_path: tvm/tests/python/tir-transform/test_tir_transform_fp8_legalize.py
imports: import tvm
  import tvm.script
  import tvm.testing
  from tvm.script import tir
label_desc: Use image node_id 8 for calling a global function with example usage: test_fp8_compute_legalize(dtype, promote_dtype) without return types