code: def generate_entrypoint(
      metrics_actor_name: str,
      metrics_actor_namespace: str,
      test: TestConfiguration,
  ):
      task_or_actor_arg = (
          "--with_tasks" if test.with_tasks else "--with_actors"
      )
      with_gpu_arg = "--with_gpu" if test.with_gpu else "--without_gpu"
      with_runtime_env_arg = (
          "--with_runtime_env"
          if test.with_runtime_env
          else "--without_runtime_env"
      )
      return " ".join(
          [
              "python ./test_single_configuration.py",
              f"--metrics_actor_name {metrics_actor_name}",
              f"--metrics_actor_namespace {metrics_actor_namespace}",
              f"--test_name {test}",
              f"--num_runs {test.num_runs_per_job} ",
              f"--num_tasks_or_actors_per_run {test.num_tasks_or_actors_per_run}",
              f"--num_cpus_in_cluster {test.num_cpus_in_cluster}",
              f"--num_gpus_in_cluster {test.num_gpus_in_cluster}",
              task_or_actor_arg,
              with_gpu_arg,
              with_runtime_env_arg,
              f"--library_to_import {test.import_to_try}",
          ]
      )
  
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 4 for calling a global function with example usage: generate_entrypoint(metrics_actor_name, metrics_actor_namespace, test) and returns: str