code: def test_replace_root_copy3():
      s, target = replace_ir_builder(deep_copy=True)
      old_hash = s.mod.__hash__()
      func_ref = s.mod
      sref = s.get_sref(s.mod["main"].body.block)
      s.replace(sref, target)
      # Check the new body equals to target
      assert old_hash != s.mod.__hash__()
      tvm.ir.assert_structural_equal(s.mod["main"].body.block, target)
      # Check the original func remains unchanged
      assert old_hash == func_ref.__hash__()
      assert not tvm.ir.structural_equal(
          func_ref["main"].body.block, target
      )
  
imports: import gc
  import sys
  import pytest
  import tvm
  import tvm.testing
  from tvm import tir
  from tvm.ir import IRModule
  from tvm.script import tir
label_desc: Use image node_id 16 for calling a global function with example usage: test_replace_root_copy3() without return types