def _check_stream_timeout(started, timeout):
if timeout:<EOL><INDENT>elapsed = datetime.datetime.utcnow() - started<EOL>if elapsed.seconds > timeout:<EOL><INDENT>raise StopIteration<EOL><DEDENT><DEDENT>
Check if the timeout has been reached and raise a `StopIteration` if so.