code: def test_llvm_targets():
      ##
      ## check LLVM backend
      ##
  
      # check blank results
      assert len(codegen.llvm_get_targets())
      assert len(codegen.llvm_get_system_cpu())
      assert len(codegen.llvm_get_system_triple())
      assert len(codegen.llvm_get_system_x86_vendor())
      # check ffi vs python
      assert (
          codegen.llvm_get_system_cpu()
          == _ffi_api.llvm_get_system_cpu()
      )
      assert (
          codegen.llvm_get_system_triple()
          == _ffi_api.llvm_get_system_triple()
      )
      assert (
          codegen.llvm_get_system_x86_vendor()
          == _ffi_api.llvm_get_system_x86_vendor()
      )
      assert str(codegen.llvm_get_targets()) == str(
          _ffi_api.llvm_get_targets()
      )
  
      # check LLVM target -mcpu legality
      try:
          tvm.target.codegen.llvm_get_cpu_features(
              tvm.target.Target(
                  "llvm -mtriple=x86_64-linux-gnu -mcpu=dummy"
              )
          )
          assert False
      except tvm.error.TVMError as e:
          msg = str(e)
          assert (
              msg.find(
                  "TVMError: LLVM cpu architecture `-mcpu=dummy` is not valid in `-mtriple=x86_64-linux-gnu`"
              )
              != -1
          )
  
imports: import pytest
  import tvm
  from tvm.target import _ffi_api, codegen, Target
label_desc: Use image node_id 1 for calling a global function with example usage: test_llvm_targets() without return types