class_docstr: .. note:: tested on etcd server v3.4.3.
  
  Starts and stops a local standalone etcd server on a random free
  port. Useful for single node, multi-worker launches or testing,
  where a sidecar etcd server is more convenient than having to
  separately setup an etcd server.
  
  This class registers a termination handler to shutdown the etcd
  subprocess on exit. This termination handler is NOT a substitute for
  calling the ``stop()`` method.
  
  The following fallback mechanism is used to find the etcd binary:
  
  1. Uses env var TORCHELASTIC_ETCD_BINARY_PATH
  2. Uses ``<this file root>/bin/etcd`` if one exists
  3. Uses ``etcd`` from ``PATH``
  
  Usage
  ::
  
   server = EtcdServer("/usr/bin/etcd", 2379, "/tmp/default.etcd")
   server.start()
   client = server.get_client()
   # use client
   server.stop()
  
  Args:
      etcd_binary_path: path of etcd server binary (see above for fallback path)
docstr: Return the etcd server endpoint (host:port).
docstr_tok: ["Return","the","etcd","server","endpoint","(","host",":","port",")","."]
code: def get_endpoint(self) -> str:
      """Return the etcd server endpoint (host:port)."""
      return f"{self._host}:{self._port}"
  
imports: import atexit
  import logging
  import os
  import shlex
  import shutil
  import socket
  import subprocess
  import tempfile
  import time
  from typing import Optional, TextIO, Union
label_desc: Use image node_id 5 for calling the EtcdServer obj's underlying member method code with example usage: obj.get_endpoint() and returns: self, str, self