def parse_skypipe_data_stream(msg, for_pipe):
header = str(msg.pop(<NUM_LIT:0>))<EOL>command = str(msg.pop(<NUM_LIT:0>))<EOL>pipe_name = str(msg.pop(<NUM_LIT:0>))<EOL>data = str(msg.pop(<NUM_LIT:0>))<EOL>if header != SP_HEADER: return<EOL>if pipe_name != for_pipe: return<EOL>if command != SP_CMD_DATA: return<EOL>if data == SP_DATA_EOF:<EOL><INDENT>raise EOFError()<EOL><DEDENT>else:<EOL><INDENT>return data<EOL><DEDENT>
May return data from skypipe message or raises EOFError