code: def get_stats():
      labels = [
          f"app.kubernetes.io/instance=ray-locust-{CLUSTER_ID}",
          "app.kubernetes.io/name=locust,component=master",
      ]
      pods = cli.list_namespaced_pod(
          "default", label_selector=",".join(labels)
      )
      assert len(pods.items) == 1
      pod_name = pods.items[0].metadata.name
      subprocess.check_output(
          [
              "kubectl",
              "cp",
              f"{pod_name}:/home/locust/test_result_{CLUSTER_ID}_stats_history.csv",
              "./stats_history.csv",
          ]
      )
      data = []
      with open("stats_history.csv") as f:
          import csv
  
          reader = csv.reader(f)
          for d in reader:
              data.append(d)
      # The first 5mins is for warming up
      offset = 300
      start_time = int(data[offset][0])
      end_time = int(data[-1][0])
      # 17 is the index for total requests
      # 18 is the index for total failed requests
      total = float(data[-1][17]) - float(data[offset][17])
      failures = float(data[-1][18]) - float(data[offset][18])
  
      # Available, through put
      return (
          (total - failures) / total,
          total / (end_time - start_time),
          data,
      )
  
imports: import enum
  import json
  import subprocess
  from kubernetes import client, config, watch
  import requests
  import random
  import uuid
  import pathlib
  import time
  import ray
  import os
label_desc: Use image node_id 11 for calling a global function with example usage: get_stats() and returns: unknown,  unknown,  data