code: def test_cprint():
      # Print string
      cprint("a + 1")
  
      # Print nodes with `script` method, e.g. PrimExpr
      cprint(tvm.tir.Var("v", "int32") + 1)
  
      # Cannot print non-Python-style codes if black installed
      try:
          import black
  
          with pytest.raises(ValueError):
              cprint("if (a == 1) { a +=1; }")
      except ImportError:
          pass
  
      # Cannot print unsupported nodes (nodes without `script` method)
      with pytest.raises(TypeError):
          cprint(relay.const(1))
  
file_path: tvm/tests/python/tvmscript/test_tvmscript_printer_highlight.py
imports: import pytest
  import tvm
  import tvm.testing
  from tvm import relay
  from tvm.script import tir
  from tvm.script.highlight import cprint
label_desc: Use image node_id 2 for calling a global function with example usage: test_cprint() without return types