code: def test_region_set_creator_diamond():
      data = relay.var("data", shape=(10, 10))
      cb_1 = compiler_begin(data, "test_target")
      O_1 = relay.abs(cb_1)
      ce_1 = compiler_end(O_1, "test_target")
      ce_2 = compiler_end(O_1, "test_target")
      cb_2 = compiler_begin(ce_1, "test_target")
      O_2 = relay.nn.relu(cb_2)
      ce_3 = compiler_end(O_2, "test_target")
      cb_d = compiler_begin(ce_2, "default")
      X = relay.tanh(cb_d)
      ce_d = compiler_end(X, "default")
      cb_3 = compiler_begin(ce_3, "test_target")
      cb_4 = compiler_begin(ce_d, "test_target")
      O_3 = relay.add(cb_3, cb_4)
      ce_4 = compiler_end(O_3, "test_target")
      diamond = relay.Function([data], ce_4)
  
      region_set = relay.analysis.AnnotatedRegionSet(
          diamond,
          relay.op.get("annotation.compiler_begin"),
          relay.op.get("annotation.compiler_end"),
      )
      assert len(region_set) == 4
      check_region(
          region_set,
          "test_target",
          [cb_1],
          [cb_1, O_1, ce_1, ce_2],
          [ce_1, ce_2],
      )
      check_region(
          region_set,
          "test_target",
          [cb_2],
          [cb_2, O_2, ce_3],
          [ce_3],
      )
      check_region(
          region_set,
          "default",
          [cb_d],
          [cb_d, X, ce_d],
          [ce_d],
      )
      check_region(
          region_set,
          "test_target",
          [cb_3, cb_4],
          [cb_3, cb_4, O_3, ce_4],
          [ce_4],
      )
  
imports: import tvm
  from tvm import relay
  from tvm.relay.op.annotation import compiler_begin, compiler_end
label_desc: Use image node_id 2 for calling a global function with example usage: test_region_set_creator_diamond() without return types