code: def test_on_device_via_device():
      x = relay.Var("x")
      call = relay.annotation.on_device(x, tvm.device("cpu"))
      assert call.attrs.virtual_device.device_type_int == 1
  
file_path: tvm/tests/python/relay/op/annotation/test_annotation.py
imports: import tvm
  import tvm.testing
  from tvm import relay
  import pytest
label_desc: Use image node_id 2 for calling a global function with example usage: test_on_device_via_device() without return types