code: def main(
      num_cpus_in_cluster: int,
      num_gpus_in_cluster: int,
      num_tasks_or_actors_per_run: int,
      num_measurements_per_configuration: int,
  ):
      """
      Generate test cases, then run them in random order via run_and_stream_logs.
      """
      metrics_actor_name = "metrics_actor"
      metrics_actor_namespace = "metrics_actor_namespace"
      metrics_actor = MetricsActor.options(  # noqa: F841
          name=metrics_actor_name,
          namespace=metrics_actor_namespace,
      ).remote(
          expected_measurements_per_test=num_measurements_per_configuration,
      )
  
      print_disk_config()
  
      run_matrix = generate_test_matrix(
          num_cpus_in_cluster,
          num_gpus_in_cluster,
          num_tasks_or_actors_per_run,
          num_measurements_per_configuration,
      )
      print(f"List of tests: {run_matrix}")
  
      for test in random.sample(list(run_matrix), k=len(run_matrix)):
          print(f"Running test {test}")
          asyncio.run(
              run_and_stream_logs(
                  metrics_actor_name,
                  metrics_actor_namespace,
                  test,
              )
          )
  
imports: from collections import defaultdict
  from dataclasses import dataclass
  from ray._private.test_utils import safe_write_to_results_json
  from ray.job_submission import JobSubmissionClient, JobStatus
  import argparse
  import asyncio
  import random
  import ray
  import statistics
  import subprocess
  import sys
label_desc: Use image node_id 1 for calling a global function with example usage: main(num_cpus_in_cluster, num_gpus_in_cluster, num_tasks_or_actors_per_run, num_measurements_per_configuration) without return types