Parse all rows in a stream block.

    Args:
        block ( \
            ~google.cloud.bigquery_storage_v1beta1.types.ReadRowsResponse \
        ):
            A block containing Avro bytes to parse into rows.
        avro_schema (fastavro.schema):
            A parsed Avro schema, used to deserialized the bytes in the
            block.

    Returns:
        Iterable[Mapping]:
            A sequence of rows, represented as dictionaries.

def _avro_rows(block, avro_schema):
    """Parse all rows in a stream block.

    Args:
        block ( \
            ~google.cloud.bigquery_storage_v1beta1.types.ReadRowsResponse \
        ):
            A block containing Avro bytes to parse into rows.
        avro_schema (fastavro.schema):
            A parsed Avro schema, used to deserialized the bytes in the
            block.

    Returns:
        Iterable[Mapping]:
            A sequence of rows, represented as dictionaries.
    """
    blockio = six.BytesIO(block.avro_rows.serialized_binary_rows)
    while True:
        # Loop in a while loop because schemaless_reader can only read
        # a single record.
        try:
            # TODO: Parse DATETIME into datetime.datetime (no timezone),
            #       instead of as a string.
            yield fastavro.schemaless_reader(blockio, avro_schema)
        except StopIteration:
            break