code: def do_run_release_test(
      release_test_dir, provider_name, test_config, test_device_serial
  ):
      with open(
          os.path.join(
              release_test_dir,
              ".vagrant",
              "machines",
              "default",
              provider_name,
              "id",
          )
      ) as f:
          machine_uuid = f.read()
  
      # Check if target is not QEMU
      if test_config["vid_hex"] and test_config["pid_hex"]:
          ATTACH_USB_DEVICE[provider_name](
              machine_uuid,
              vid_hex=test_config["vid_hex"],
              pid_hex=test_config["pid_hex"],
              serial=test_device_serial,
          )
      tvm_home = os.path.realpath(THIS_DIR / ".." / ".." / "..")
  
      def _quote_cmd(cmd):
          return " ".join(shlex.quote(a) for a in cmd)
  
      test_cmd = (
          _quote_cmd(["cd", tvm_home])
          + " && "
          + _quote_cmd(
              [
                  f"apps/microtvm/reference-vm/base-box/base_box_test.sh",
                  test_config["microtvm_board"],
              ]
          )
      )
      subprocess.check_call(
          ["vagrant", "ssh", "-c", f"bash -ec '{test_cmd}'"],
          cwd=release_test_dir,
      )
  
imports: import argparse
  import copy
  import json
  import logging
  import pathlib
  import os
  import re
  import shlex
  import shutil
  import subprocess
  import sys
  import pathlib
label_desc: Use image node_id 9 for calling a global function with example usage: do_run_release_test(release_test_dir, provider_name, test_config, test_device_serial) and returns: str