code: def test_merge_fail_with_different_scope():
      @T.prim_func
      def elementwise_with_different_scope(
          a: T.handle, c: T.handle
      ) -> None:
          A = T.match_buffer(a, (128, 128, 128))
          C = T.match_buffer(c, (128, 128, 128))
          B = T.alloc_buffer((128, 128, 128))
          with T.block("A"):
              for i, j in T.grid(128, 128):
                  for k in T.serial(0, 128):
                      with T.block("B"):
                          vi, vj, vk = T.axis.remap("SSS", [i, j, k])
                          B[vi, vj, vk] = A[vi, vj, vk] * 2.0
          for i, j in T.grid(128, 128):
              for k in T.serial(0, 128):
                  with T.block("C"):
                      vi, vj, vk = T.axis.remap("SSS", [i, j, k])
                      C[vi, vj, vk] = A[vi, vj, vk] * 2.0
  
      sch = tir.Schedule(
          elementwise_with_different_scope, debug_mask="all"
      )
      block_b = sch.get_block("B")
      _, _, b = sch.get_loops(block_b)
      block_c = sch.get_block("C")
      _, _, c = sch.get_loops(block_c)
      with pytest.raises(tvm.tir.ScheduleError):
          sch.merge(b, c)
  
file_path: tvm/tests/python/tir-schedule/test_tir_schedule_merge.py
imports: import pytest
  import tvm
  import tvm.testing
  from tvm import tir
  from tvm.script import tir
  from tvm.tir.schedule.testing import verify_trace_roundtrip, assert_structural_equal_ignore_global_symbol
label_desc: Use image node_id 10 for calling a global function with example usage: test_merge_fail_with_different_scope() without return types