<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def stream_skypipe_output(endpoint, name=None):
 """Generator for reading skypipe data"""

    name = name or ''
    socket = ctx.socket(zmq.DEALER)
    socket.connect(endpoint)
    try:
        socket.send_multipart(sp_msg(SP_CMD_LISTEN, name))

        while True:
            msg = socket.recv_multipart()
            try:
                data = parse_skypipe_data_stream(msg, name)
                if data:
                    yield data
            except EOFError:
                raise StopIteration()

    finally:
        socket.send_multipart(sp_msg(SP_CMD_UNLISTEN, name))
        socket.close()