class_docstr: Utility class to facilitate API queries and state management of
  session data.
docstr: Retrieve the resource which is connected to a healthy node
docstr_tok: ["Retrieve","the","resource","which","is","connected","to","a","healthy","node"]
code: def get_healthy_resource(self):
      """Retrieve the resource which is connected to a healthy node"""
  
      for healthcheck_url, request_url in zip(
          self.healthcheck_urls, self.request_urls
      ):
          try:
              (
                  resource,
                  columns,
                  raw_dtypes,
              ) = core_ops.io_elasticsearch_readable_init(
                  healthcheck_url=healthcheck_url,
                  healthcheck_field="status",
                  request_url=request_url,
                  headers=self.headers,
              )
              print(f"Connection successful: {healthcheck_url}")
              dtypes = []
              for dtype in raw_dtypes:
                  if dtype == "DT_INT32":
                      dtypes.append(tf.int32)
                  elif dtype == "DT_INT64":
                      dtypes.append(tf.int64)
                  elif dtype == "DT_DOUBLE":
                      dtypes.append(tf.double)
                  elif dtype == "DT_STRING":
                      dtypes.append(tf.string)
                  elif dtype == "DT_BOOL":
                      dtypes.append(tf.bool)
              return resource, columns.numpy(), dtypes, request_url
          except Exception:
              print(f"Skipping node: {healthcheck_url}")
              continue
      else:
          raise ConnectionError(
              "No healthy node available for the index: {}, please check the cluster config".format(
                  self.index
              )
          )
  
file_path: io/tensorflow_io/python/experimental/elasticsearch_dataset_ops.py
imports: from urllib.parse import urlparse
  import tensorflow
  from tensorflow_io.python.ops import core_ops
  from tensorflow_io.python.experimental import serialization_ops
label_desc: Use image node_id 4 for calling the _ElasticsearchHandler obj's underlying member method code with example usage: obj.get_healthy_resource() and returns: resource,  columns,  dtypes,  request_url