code: def run_test(test_name: str, test_args: List[str]):
      monitor_actor = test_utils.monitor_memory_usage()
  
      start = time.perf_counter()
      run_release_test_in_subprocess(test_name, test_args)
      end = time.perf_counter()
      # Collect mem usage
      ray.get(monitor_actor.stop_run.remote())
      used_gb, usage = ray.get(
          monitor_actor.get_peak_memory_info.remote()
      )
  
      results = {
          "duration": end - start,
          "peak_memory": round(used_gb, 2),
          "peak_process_memory": usage,
      }
      return results
  
file_path: ray/release/nightly_tests/stress_tests/test_state_api_with_other_tests.py
imports: import time
  from typing import Dict, List
  import click
  import json
  import os
  import ray
  from ray.util.state import list_actors, list_nodes, list_objects, list_tasks, summarize_actors, summarize_objects, summarize_tasks
  import ray._private.test_utils
  from ray._private.state_api_test_utils import StateAPICallSpec, periodic_invoke_state_apis_with_actor, STATE_LIST_LIMIT
label_desc: Use image node_id 4 for calling a global function with example usage: run_test(test_name, test_args) and returns: results