code: def test_target_features(
      min_llvm_version,
      llvm_target,
      cpu_arch,
      cpu_features,
      is_supported,
  ):
      target = Target(
          "llvm -mtriple=%s-- -mcpu=%s" % (llvm_target, cpu_arch)
      )
  
      ##
      ## legalize llvm_target
      ##
  
      assert llvm_target in codegen.llvm_get_targets()
  
      ##
      ## legalize cpu_arch
      ##
  
      ### with context
      with target:
          assert cpu_arch in codegen.llvm_get_cpu_archlist()
      ### no context but with expicit target
      assert cpu_arch in codegen.llvm_get_cpu_archlist(target)
      # check ffi vs python
      assert str(codegen.llvm_get_cpu_archlist(target)) == str(
          _ffi_api.llvm_get_cpu_archlist(target)
      )
  
      ##
      ## check has_features
      ##
  
      ### with context
      with target:
          assert (
              codegen.llvm_cpu_has_features(cpu_features)
              == is_supported
          )
      ### no context but with expicit target
      assert (
          codegen.llvm_cpu_has_features(cpu_features, target)
          == is_supported
      )
      # check ffi vs python
      for feat in cpu_features:
          assert str(
              codegen.llvm_cpu_has_features(feat, target)
          ) == str(_ffi_api.llvm_cpu_has_feature(feat, target))
  
imports: import pytest
  import tvm
  from tvm.target import _ffi_api, codegen, Target
label_desc: Use image node_id 2 for calling a global function with example usage: test_target_features(min_llvm_version, llvm_target, cpu_arch, cpu_features, is_supported) without return types