code: def start_sending_traffics(duration, users):
      print("=== Install locust by helm ===")
      yaml_config = (
          pathlib.Path("locust-run.yaml")
          .read_text()
          .format(
              users=users, cluster_id=CLUSTER_ID, duration=int(duration)
          )
      )
      print("=== Locust YAML ===")
      print(yaml_config)
  
      pathlib.Path("/tmp/locust-run-config.yaml").write_text(
          yaml_config
      )
      helm_install_logs = subprocess.check_output(
          [
              "helm",
              "install",
              LOCUST_ID,
              "deliveryhero/locust",
              "-f",
              "/tmp/locust-run-config.yaml",
          ]
      )
      print(helm_install_logs)
  
      timeout_wait_for_locust_s = 300
      while timeout_wait_for_locust_s > 0:
          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
  
          if pods.items[0].status.phase == "Pending":
              print("Waiting for the locust pod to be ready...")
              time.sleep(30)
              timeout_wait_for_locust_s -= 30
          else:
              break
  
      proc = subprocess.Popen(
          [
              "kubectl",
              "port-forward",
              f"svc/ray-locust-{CLUSTER_ID}",
              "8080:8089",
              "--address=0.0.0.0",
          ]
      )
      return proc
  
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 6 for calling a global function with example usage: start_sending_traffics(duration, users) and returns: proc