code: def main(
      chain_length: Optional[int],
      init_delay_secs: Optional[int],
      compute_delay_secs: Optional[int],
      num_requests_per_client: Optional[int],
      num_clients: Optional[int],
      throughput_trial_duration_secs: Optional[int],
      local_test: Optional[bool],
  ):
      if local_test:
          setup_local_single_node_cluster(1, num_cpu_per_node=8)
      else:
          setup_anyscale_cluster()
  
      serve_dag = test_long_chain_deployment_graph(
          chain_length,
          init_delay_secs=init_delay_secs,
          compute_delay_secs=compute_delay_secs,
      )
      dag_handle = serve.run(serve_dag)
      assert dag_handle.compute.remote(0).result() == chain_length
  
      throughput_mean_tps, throughput_std_tps = asyncio.run(
          benchmark_throughput_tps(
              dag_handle.compute.remote,
              chain_length,
              duration_secs=throughput_trial_duration_secs,
              num_clients=num_clients,
          )
      )
      latency_mean_ms, latency_std_ms = asyncio.run(
          benchmark_latency_ms(
              dag_handle.compute.remote,
              chain_length,
              num_requests=num_requests_per_client,
              num_clients=num_clients,
          )
      )
      print(f"chain_length: {chain_length}, num_clients: {num_clients}")
      print(
          f"latency_mean_ms: {latency_mean_ms}, "
          f"latency_std_ms: {latency_std_ms}"
      )
      print(
          f"throughput_mean_tps: {throughput_mean_tps}, "
          f"throughput_std_tps: {throughput_std_tps}"
      )
  
      results = {
          "chain_length": chain_length,
          "init_delay_secs": init_delay_secs,
          "compute_delay_secs": compute_delay_secs,
          "local_test": local_test,
      }
      results["perf_metrics"] = [
          {
              "perf_metric_name": "throughput_mean_tps",
              "perf_metric_value": throughput_mean_tps,
              "perf_metric_type": "THROUGHPUT",
          },
          {
              "perf_metric_name": "throughput_std_tps",
              "perf_metric_value": throughput_std_tps,
              "perf_metric_type": "THROUGHPUT",
          },
          {
              "perf_metric_name": "latency_mean_ms",
              "perf_metric_value": latency_mean_ms,
              "perf_metric_type": "LATENCY",
          },
          {
              "perf_metric_name": "latency_std_ms",
              "perf_metric_value": latency_std_ms,
              "perf_metric_type": "LATENCY",
          },
      ]
      save_test_results(results)
  
file_path: ray/release/serve_tests/workloads/deployment_graph_long_chain.py
imports: import time
  import asyncio
  import click
  from typing import Optional
  import starlette.requests
  from ray import serve
  from ray.serve.handle import DeploymentHandle
  from serve_test_cluster_utils import setup_local_single_node_cluster, setup_anyscale_cluster
  from serve_test_utils import save_test_results
  from benchmark_utils import benchmark_throughput_tps, benchmark_latency_ms
label_desc: Use image node_id 2 for calling a global function with example usage: main(chain_length, init_delay_secs, compute_delay_secs, num_requests_per_client, num_clients, throughput_trial_duration_secs, local_test) without return types