def read_stream_tuples(schema, stream, *, buffer_size=io.DEFAULT_BUFFER_SIZE):
reader = _lancaster.Reader(schema, _get_datetime_flags(schema))<EOL>buf = stream.read(buffer_size)<EOL>remainder = b'<STR_LIT>'<EOL>while len(buf) > <NUM_LIT:0>:<EOL><INDENT>values, n = reader.read_seq_tuples(buf)<EOL>yield from values<EOL>remainder = buf[n:]<EOL>buf = stream.read(buffer_size)<EOL>if len(buf) > <NUM_LIT:0> and len(remainder) > <NUM_LIT:0>:<EOL><INDENT>ba = bytearray()<EOL>ba.extend(remainder)<EOL>ba.extend(buf)<EOL>buf = memoryview(ba).tobytes()<EOL><DEDENT><DEDENT>if len(remainder) > <NUM_LIT:0>:<EOL><INDENT>raise EOFError('<STR_LIT>'<EOL>'<STR_LIT>'.format(len(remainder)))<EOL><DEDENT>
Using a schema, deserialize a stream of consecutive Avro values
    into tuples.

    This assumes the input is avro records of simple values (numbers,
    strings, etc.).

    :param str schema: json string representing the Avro schema, field
        names may include 'is_datetime' boolean fields to force
        decoding long values of epoch nanoseconds into datetime
        objects
    :param file-like stream: a buffered stream of binary input
    :param int buffer_size: size of bytes to read from the stream each time
    :return: yields a sequence of python tuples deserialized from the stream