class_docstr: Utility class to facilitate API queries and state management of
  session data.
docstr: Prepares the base url for establish connection with the
  elasticsearch master.
  
  Returns:
      A list of base_url's, each of type tf.string for establishing
      the connection pool.
docstr_tok: ["Prepares","the","base","url","for","establish","connection","with","the","elasticsearch","master",".","Returns",":","A","list","of","base_url","'s",",","each","of","type","tf.string","for","establishing","the","connection","pool","."]
code: def prepare_base_urls(self):
      """Prepares the base url for establish connection with the
      elasticsearch master.
  
      Returns:
          A list of base_url's, each of type tf.string for establishing
          the connection pool.
      """
  
      if self.nodes is None:
          self.nodes = ["http://localhost:9200"]
  
      elif isinstance(self.nodes, str):
          self.nodes = [self.nodes]
  
      self.base_urls = []
      for node in self.nodes:
          if "//" not in node:
              raise ValueError(
                  "Please provide the list of nodes in 'protocol://host:port' format."
              )
  
          # Additional sanity check
          url_obj = urlparse(node)
          base_url = f"{url_obj.scheme}://{url_obj.netloc}"
          self.base_urls.append(base_url)
  
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 2 for calling the _ElasticsearchHandler obj's underlying member method code with example usage: obj.prepare_base_urls() without return types