code: def test_let():
      def test_let1():
          x = relay.Var("x")
          c = relay.const(4.0, "float32")
          body = relay.Let(x, c, x)
          body = run_opt_pass(body, transform.InferType())
          """
          let %x: float32 = 4f /* ty=float32 */;
          %x
          """
          opt_body = run_opt_pass(
              body, transform.ToBasicBlockNormalForm()
          )
          assert tvm.ir.structural_equal(body, opt_body)
          check_basic_block_normal_form(opt_body)
  
      def test_let1_1():
          x = relay.Var("y")
          d = relay.const(4.0, "float32")
          body = relay.Let(x, d, relay.add(x, x))
          body = run_opt_pass(body, transform.InferType())
          opt_body = run_opt_pass(
              body, transform.ToBasicBlockNormalForm()
          )
          assert tvm.ir.structural_equal(body, opt_body)
          check_basic_block_normal_form(opt_body)
  
      def test_let2():
          x = relay.Var("x")
          y = relay.Var("y")
          d = relay.const(4.0, "float32")
          body = relay.Let(y, x, x)
          body = relay.Let(x, d, body)
          body = run_opt_pass(body, transform.InferType())
          check_eval(body, 4)
  
          def expected():
              x = relay.Var("x")
              y = relay.Var("y")
              d = relay.const(4.0, "float32")
              body = relay.Let(y, x, y)
              body = relay.Let(x, d, body)
              return body
  
          opt_body = run_opt_pass(
              body, transform.ToBasicBlockNormalForm()
          )
          expected_body = run_opt_pass(
              expected(), transform.InferType()
          )
          assert tvm.ir.structural_equal(opt_body, expected_body)
          check_basic_block_normal_form(opt_body)
  
      def test_let3():
          x = relay.Var("x")
          y = relay.Var("y")
          z = relay.Var("z")
          c = relay.const(3.0, "float32")
          d = relay.const(4.0, "float32")
          body = relay.Let(z, x + y, x + z)
          body = relay.Let(x, d, body)
          body = relay.Let(y, c, body)
          body = run_opt_pass(body, transform.InferType())
          opt_body = run_opt_pass(
              body, transform.ToBasicBlockNormalForm()
          )
          assert tvm.ir.structural_equal(body, opt_body)
          check_basic_block_normal_form(opt_body)
  
      test_let1()
      test_let1_1()
      test_let2()
      test_let3()
  
imports: import pytest
  import numpy
  import tvm
  from tvm import te
  from tvm import relay
  from tvm.relay.analysis import detect_feature
  from tvm.relay import op, create_executor, transform
  from tvm.relay.prelude import Prelude
  from tvm.relay.testing import count, create_workload
  from tvm.relay.analysis import Feature
  from tvm.relay.analysis import check_basic_block_normal_form
label_desc: Use image node_id 9 for calling a global function with example usage: test_let() and returns: body