def check_skypipe_endpoint(endpoint, timeout=<NUM_LIT:10>):
socket = ctx.socket(zmq.DEALER)<EOL>socket.linger = <NUM_LIT:0><EOL>socket.connect(endpoint)<EOL>socket.send_multipart(sp_msg(SP_CMD_HELLO))<EOL>timeout_time = time.time() + timeout<EOL>while time.time() < timeout_time:<EOL><INDENT>reply = None<EOL>try:<EOL><INDENT>reply = socket.recv_multipart(zmq.NOBLOCK)<EOL>break<EOL><DEDENT>except zmq.ZMQError:<EOL><INDENT>time.sleep(<NUM_LIT:0.1>)<EOL><DEDENT><DEDENT>socket.close()<EOL>if reply:<EOL><INDENT>return str(reply.pop(<NUM_LIT:0>)) == SP_HEADER<EOL><DEDENT>
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