code: def test_target_device_replacement():
      assert (
          _replace_device_with_tracing("cuda") == "cuda -device=tracing"
      )
      assert (
          _replace_device_with_tracing(
              "cuda -device=some_device -libs=cudnn"
          )
          == "cuda -device=tracing -libs=cudnn"
      )
      assert (
          _replace_device_with_tracing("llvm -device=arm_cpu -arg=xxx")
          == "llvm -device=tracing -arg=xxx"
      )
      assert (
          _replace_device_with_tracing("llvm -device=arm_cpu")
          == "llvm -device=tracing"
      )
      assert (
          _replace_device_with_tracing("llvm -device=abc, def")
          == "llvm -device=tracing"
      )
  
file_path: tvm/tests/python/autotvm/test_autotvm_graph_tuner_utils.py
imports: import pytest
  import tvm
  from tvm import te
  from tvm import autotvm, relay
  from tvm.relay.testing import synthetic
  from tvm.autotvm.graph_tuner.utils import has_multiple_inputs, get_direct_ancestor, get_in_nodes, get_out_nodes, expr2graph, bind_inputs
  from tvm.autotvm.graph_tuner._base import OPT_OUT_OP
  from tvm.autotvm.graph_tuner.utils.traverse_graph import _replace_device_with_tracing
  from tvm.relay.expr import Call, TupleGetItem, Tuple, Var
label_desc: Use image node_id 7 for calling a global function with example usage: test_target_device_replacement() without return types