class_docstr: This class is the type of instance returned by the `_setup_ray_cluster` interface.
  Its main functionality is to:
  Connect to, disconnect from, and shutdown the Ray cluster running on Apache Spark.
  Serve as a Python context manager for the `RayClusterOnSpark` instance.
  
  Args
      address: The url for the ray head node (defined as the hostname and unused
               port on Spark driver node)
      head_proc: Ray head process
      spark_job_group_id: The Spark job id for a submitted ray job
      num_workers_node: The number of workers in the ray cluster.
class_docstr_tok: ["This","class","is","the","type","of","instance","returned","by","the","`","_setup_ray_cluster","`","interface",".","Its","main","functionality","is","to",":","Connect","to",",","disconnect","from",",","and","shutdown","the","Ray","cluster","running","on","Apache","Spark",".","Serve","as","a","Python","context","manager","for","the","`","RayClusterOnSpark","`","instance",".","Args","address",":","The","url","for","the","ray","head","node","(","defined","as","the","hostname","and","unused","port","on","Spark","driver","node",")","head_proc",":","Ray","head","process","spark_job_group_id",":","The","Spark","job","id","for","a","submitted","ray","job","num_workers_node",":","The","number","of","workers","in","the","ray","cluster","."]
code: def disconnect(self):
      ray.shutdown()
      self.ray_ctx = None
  
imports: import copy
  import yaml
  import json
  import os
  import socket
  import sys
  import time
  import threading
  import logging
  import uuid
  import warnings
  import requests
  from packaging.version import Version
  from typing import Optional, Dict, Tuple, Type
  import ray
  import ray._private.services
  from ray.autoscaler._private.spark.node_provider import HEAD_NODE_ID
  from ray.util.annotations import DeveloperAPI, PublicAPI
  from ray._private.storage import _load_class
  from .utils import exec_cmd, is_port_in_use, get_random_unused_port, get_spark_session, get_spark_application_driver_host, is_in_databricks_runtime, get_spark_task_assigned_physical_gpus, get_avail_mem_per_ray_worker_node, get_max_num_concurrent_tasks, gen_cmd_exec_failure_msg, calc_mem_ray_head_node, _wait_service_up
  from .start_hook_base import RayOnSparkStartHook
  from .databricks_hook import DefaultDatabricksRayOnSparkStartHook
  from threading import Event
label_desc: Use image node_id 5 for calling the RayClusterOnSpark obj's underlying member method code with example usage: obj.disconnect() without return types