def test_simple_read_tensorflow_with_parquet_dataset(scalar_dataset):
    """Read couple of rows. Make sure all tensors have static shape sizes assigned and the data matches reference
    data"""
    with make_batch_reader(dataset_url_or_urls=scalar_dataset.url) as reader:
        row_tensors = tf_tensors(reader)
        row_tensors_dict = row_tensors._asdict()
        # Make sure we have static shape info for all fields
        for column_name in row_tensors_dict:
            column = row_tensors_dict[column_name]
            column_shape = column.get_shape().as_list()
            if column_name == 'int_fixed_size_list':
                assert column_shape == [None, None]
            else:
                assert column_shape == [None]

        with _tf_session() as sess:
            for _ in range(2):
                batch = sess.run(row_tensors)._asdict()
                for i, id_value in enumerate(batch['id']):
                    expected_row = next(d for d in scalar_dataset.data if d['id'] == id_value)
                    for field_name in expected_row.keys():
                        _assert_fields_eq(batch[field_name][i], expected_row[field_name])
Read couple of rows. Make sure all tensors have static shape sizes assigned and the data matches reference
    data
petastorm/tests/test_tf_utils.py