code: def check_skypipe_endpoint(endpoint, timeout=10):
      
      socket = ctx.socket(zmq.DEALER)
      socket.linger = 0
      socket.connect(endpoint)
      socket.send_multipart(sp_msg(SP_CMD_HELLO))
      timeout_time = time.time() + timeout
      while time.time() < timeout_time:
          reply = None
          try:
              reply = socket.recv_multipart(zmq.NOBLOCK)
              break
          except zmq.ZMQError:
              time.sleep(0.1)
      socket.close()
      if reply:
          return str(reply.pop(0)) == SP_HEADER
docs: Skypipe endpoint checker -- pings endpoint
  
      Returns True if endpoint replies with valid header,
      Returns False if endpoint replies with invalid header,
      Returns None if endpoint does not reply within timeout