class_docstr: e2e verification of autoscaling following the steps in the Ray documentation.
  kubectl is used throughout, as that reflects the instructions in the docs.
class_docstr_tok: ["e2e","verification","of","autoscaling","following","the","steps","in","the","Ray","documentation",".","kubectl","is","used","throughout",",","as","that","reflects","the","instructions","in","the","docs","."]
code: def _non_terminated_nodes_count(self) -> int:
      with ray_client_port_forward(head_service=HEAD_SERVICE):
          return non_terminated_nodes_count.main()
  
file_path: ray/python/ray/tests/kuberay/test_autoscaling_e2e.py
imports: import base64
  import copy
  import logging
  import os
  import pytest
  import subprocess
  import sys
  import tempfile
  import unittest
  from typing import Any, Dict
  import yaml
  from ray.tests.kuberay.utils import get_pod, get_pod_names, get_raycluster, ray_client_port_forward, ray_job_submit, switch_to_ray_parent_dir, kubectl_exec_python_script, kubectl_logs, kubectl_delete, wait_for_pods, wait_for_pod_to_start, wait_for_ray_health
  from ray.tests.kuberay.scripts import gpu_actor_placement, gpu_actor_validation, non_terminated_nodes_count
label_desc: Use image node_id 3 for calling the KubeRayAutoscalingTest obj's underlying member method code with example usage: obj._non_terminated_nodes_count() and returns: non_terminated_nodes_count