def _streamSSE(url, on_data=print, accrue=False):
messages = SSEClient(url)<EOL>if accrue:<EOL><INDENT>ret = []<EOL><DEDENT>for msg in messages:<EOL><INDENT>data = msg.data<EOL>on_data(json.loads(data))<EOL>if accrue:<EOL><INDENT>ret.append(msg)<EOL><DEDENT><DEDENT>return ret<EOL>
internal