code: def run_tests(args, testlist):
      start = time.time()
      idx = 1
      failed = []
      total = len(testlist)
      for test in testlist:
          cmd = (
              "compute-sanitizer --require-cuda-init=no --tool %s %s %s "
              % (args.tool, ToolOptions[args.tool], args.exe)
          )
          cmd += "--gtest_filter=%s" % test
          print(
              "[%d/%d Failed:%d] Checking %s ... "
              % (idx, total, len(failed), test),
              end="",
          )
          sys.stdout.flush()
          retcode, out = run_cmd(cmd, args.pwd)
          print("[%s]" % ("PASS" if retcode == 0 else "FAIL"))
          if retcode != 0:
              if args.verbose:
                  print(out)
              failed.append(test)
          idx += 1
      if len(failed) != 0:
          print(
              "FAIL: %d failed tests out of %d. Failed tests are"
              % (len(failed), total)
          )
          for f in failed:
              print("  %s" % f)
      else:
          print("PASS")
      diff = time.time() - start
      print("Total time taken: %d s" % diff)
      if len(failed) != 0:
          raise Exception("Test failed!")
  
file_path: cuml/cpp/scripts/cuda-memcheck.py
imports: from __future__ import print_function
  import os
  import subprocess
  import argparse
  import time
  import re
  import sys
label_desc: Use image node_id 4 for calling a global function with example usage: run_tests(args, testlist) without return types