docstr: Send the request to the server and retry on errors.
  Streams data that follow a AckStreamResponse to the given utf8 text stream.
docstr_tok: ["Send","the","request","to","the","server","and","retry","on","errors",".","Streams","data","that","follow","a","AckStreamResponse","to","the","given","utf8","text","stream","."]
code: def _send_one(self, addr, req, stream=None):
      """
      Send the request to the server and retry on errors.
      Streams data that follow a AckStreamResponse to the given utf8 text stream.
      """
      for iter in range(self._attempts):
          sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
          try:
              sock.connect(addr)
              rfile = sock.makefile("rb")
              wfile = sock.makefile("wb")
              try:
                  self._wire.write(req, wfile)
                  resp = self._wire.read(rfile)
                  if stream and isinstance(resp, AckStreamResponse):
                      # stream and byte content in rfile are expected to be utf8 text
                      from encodings.utf_8 import StreamReader
  
                      r = StreamReader(rfile)
                      shutil.copyfileobj(r, stream)
                  return resp
              finally:
                  rfile.close()
                  wfile.close()
          except:
              if iter == self._attempts - 1:
                  # Raise exception on the last retry.
                  raise
          finally:
              sock.close()
  
imports: import pickle
  import psutil
  import queue
  import socket
  import socketserver
  import struct
  import shutil
  import cloudpickle
  from horovod.runner.util.threads import in_thread
  from horovod.runner.common.util import secret
  from horovod.runner.util.network import find_port
label_desc: Use image node_id 4 for calling the BasicClient obj's underlying member method code with example usage: obj._send_one(addr, req, stream) and returns: resp