code: def __init__(self, sock, s_addr):
      slave = ExSocket(sock)
      self.sock = slave
      self.host = get_some_ip(s_addr[0])
      magic = slave.recvint()
      assert magic == kMagic, "invalid magic number=%d from %s" % (
          magic,
          self.host,
      )
      slave.sendint(kMagic)
      self.rank = slave.recvint()
      self.world_size = slave.recvint()
      self.jobid = slave.recvstr()
      self.cmd = slave.recvstr()
      self.wait_accept = 0
      self.port = None
  
imports: from __future__ import absolute_import
  import os
  import sys
  import socket
  import struct
  import subprocess
  import argparse
  import time
  import logging
  from threading import Thread
label_desc: Use image node_id 1 to create a new SlaveEntry object from inherited base classes: object with example: obj = SlaveEntry(sock, s_addr)