code: def test_valid_if2():
      """
      fn (%x: float32) {
        let %v1 = add(%x, 1f);
        %0 = equal(%x, 2f);
        if (%0) {
          multiply(%v1, 2f)
        } else {
          multiply(%v1, 1f)
        }
      }
      """
      x = relay.var("x", shape=(), dtype="float32")
      one = relay.const(1, dtype="float32")
      two = relay.const(2, dtype="float32")
      v1 = relay.var("v1")
      v2 = relay.equal(x, two)
      true_branch = relay.multiply(v1, two)
      false_branch = relay.multiply(v1, one)
      body = relay.If(v2, true_branch, false_branch)
      body = relay.Let(v1, relay.add(x, one), body)
      func = relay.Function([x], body)
      check_basic_block_normal_form(func)
  
file_path: tvm/tests/python/relay/test_analysis_basic_block_normal_form.py
imports: import pytest
  import tvm
  from tvm import relay
  from tvm.relay.analysis import check_basic_block_normal_form
label_desc: Use image node_id 6 for calling a global function with example usage: test_valid_if2() without return types