code: def _assert_expected_rows_data(expected_data, rows_data):
      """Asserts all elements of rows_data list of rows match reference data used to create the dataset"""
      for row_tuple in rows_data:
          # It is easier to work with dict as we will be indexing column names using strings
          row = row_tuple._asdict()
  
          # Find corresponding row in the reference data
          expected = next(
              d for d in expected_data if d["id"] == row["id"]
          )
  
          # Check equivalence of all values between a checked row and a row from reference data
          for column_name, actual in row.items():
              expected_val = expected[column_name]
              _assert_fields_eq(actual, expected_val)
  
imports: from __future__ import division
  import datetime
  from calendar import timegm
  from collections import namedtuple
  from contextlib import contextmanager
  from decimal import Decimal
  from functools import wraps
  import inspect
  import numpy
  from packaging import version
  import pytest
  import tensorflow.compat.v1
  from unittest import mock
  from petastorm import make_reader, make_batch_reader, TransformSpec
  from petastorm.ngram import NGram
  from petastorm.tests.test_common import TestSchema
  from petastorm.tf_utils import _sanitize_field_tf_types, _numpy_to_tf_dtypes, _schema_to_tf_dtypes, tf_tensors, _ngrams_generator, _unflatten_and_set_shape
  from petastorm.unischema import Unischema, UnischemaField
label_desc: Use image node_id 11 for calling a global function with example usage: _assert_expected_rows_data(expected_data, rows_data) without return types