<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def skypipe_input_stream(endpoint, name=None):
 """Returns a context manager for streaming data into skypipe"""

    name = name or ''
    class context_manager(object):
        def __enter__(self):
            self.socket = ctx.socket(zmq.DEALER)
            self.socket.connect(endpoint)
            return self

        def send(self, data):
            data_msg = sp_msg(SP_CMD_DATA, name, data)
            self.socket.send_multipart(data_msg)

        def __exit__(self, *args, **kwargs):
            eof_msg = sp_msg(SP_CMD_DATA, name, SP_DATA_EOF)
            self.socket.send_multipart(eof_msg)
            self.socket.close()

    return context_manager()