code: def test_pass_wrong_device_arg():
      """Ensure an error is generated if the incorrect number of devices are passed"""
      x = tvm.relay.var("x", tvm.relay.TensorType([1], dtype="float32"))
      expr = tvm.relay.add(
          x,
          tvm.relay.Constant(
              tvm.nd.array(np.array([1], dtype="float32"))
          ),
      )
      with tvm.transform.PassContext(
          opt_level=3, config={"tir.disable_vectorize": True}
      ):
          mod = tvm.relay.build(
              tvm.IRModule.from_expr(tvm.relay.Function([x], expr)),
              target="c",
              executor=backend.Executor(
                  "aot", {"interface-api": "packed"}
              ),
          )
  
      temp_dir = tvm.contrib.utils.TempDirectory()
      test_so_path = temp_dir / "test.so"
      mod.export_library(
          test_so_path, cc="gcc", options=["-std=c11", "-g3", "-O0"]
      )
      loaded_mod = tvm.runtime.load_module(test_so_path)
  
      with pytest.raises(tvm.TVMError) as error:
          tvm.runtime.executor.AotModule(
              loaded_mod["default"](tvm.cpu(0), tvm.cpu(0))
          )
  
          assert (
              "Check failed: devices_.size() == 1 (2 vs. 1) : Expect exactly 1 device passed."
              in str(error.exception)
          )
  
file_path: tvm/tests/python/relay/aot/test_cpp_aot.py
imports: import re
  import textwrap
  import numpy
  import pytest
  import tvm
  from tvm import IRModule
  from tvm import relay
  from tvm.relay import backend, testing
  from tvm.testing.aot import generate_ref_data
label_desc: Use image node_id 6 for calling a global function with example usage: test_pass_wrong_device_arg() without return types