class_docstr: Used for serialization/deserialization of objects over the wire.
  
  We use HMAC to protect services from unauthorized use. The key used for
  the HMAC digest is distributed by Open MPI and Spark.
  
  The objects are serialized using cloudpickle. Serialized objects become
  the body of the message.
  
  Structure of the message is as follows:
  - HMAC digest of the body (32 bytes)
  - length of the body (4 bytes)
  - body
class_docstr_tok: ["Used","for","serialization\/deserialization","of","objects","over","the","wire",".","We","use","HMAC","to","protect","services","from","unauthorized","use",".","The","key","used","for","the","HMAC","digest","is","distributed","by","Open","MPI","and","Spark",".","The","objects","are","serialized","using","cloudpickle",".","Serialized","objects","become","the","body","of","the","message",".","Structure","of","the","message","is","as","follows",":","-","HMAC","digest","of","the","body","(","32","bytes",")","-","length","of","the","body","(","4","bytes",")","-","body"]
docstr: Transfers data from the utf8 text stream to the wfile until stream exhausts.
docstr_tok: ["Transfers","data","from","the","utf8","text","stream","to","the","wfile","until","stream","exhausts","."]
code: def stream(self, stream, wfile):
      """Transfers data from the utf8 text stream to the wfile until stream exhausts."""
      # we assume utf8 encoding of the stream
      from encodings.utf_8 import StreamWriter
  
      w = StreamWriter(wfile)
      # do not handle exceptions or close the stream here
      shutil.copyfileobj(stream, w)
      wfile.flush()
  
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 3 for calling the Wire obj's underlying member method code with example usage: obj.stream(stream, wfile) without return types