class_docstr: A node provider that implements provider for nodes of Ray on spark.
class_docstr_tok: ["A","node","provider","that","implements","provider","for","nodes","of","Ray","on","spark","."]
code: def _query_node_status(self, node_id):
      spark_job_group_id = self._gen_spark_job_group_id(node_id)
  
      response = requests.post(
          url=self.spark_job_server_url + "/query_task_status",
          json={"spark_job_group_id": spark_job_group_id},
      )
      response.raise_for_status()
  
      decoded_resp = response.content.decode("utf-8")
      json_res = json.loads(decoded_resp)
      return json_res["status"]
  
imports: import json
  import logging
  import sys
  from threading import RLock
  from typing import Any, Dict, Optional
  import requests
  from ray.autoscaler.node_launch_exception import NodeLaunchException
  from ray.autoscaler.node_provider import NodeProvider
  from ray.autoscaler.tags import NODE_KIND_HEAD, NODE_KIND_WORKER, STATUS_SETTING_UP, STATUS_UP_TO_DATE, TAG_RAY_NODE_KIND, TAG_RAY_NODE_NAME, TAG_RAY_NODE_STATUS, TAG_RAY_USER_NODE_TYPE
label_desc: Use image node_id 4 for calling the SparkNodeProvider obj's underlying member method code with example usage: obj._query_node_status(node_id) and returns: json_res