code: def run_dataset_eager_mode(
      dali_datasets, iterations, to_stop_iter=False
  ):
      if not isinstance(dali_datasets, list):
          dali_datasets = [dali_datasets]
  
      results = []
      with expect_iter_end(not to_stop_iter, StopIteration):
          for i, batch in zip(range(iterations), zip(*dali_datasets)):
              results.append(batch)
      return results
  
imports: import math
  import numpy
  import nvidia.dali.fn
  import nvidia.dali.plugin.tf
  import nvidia.dali.types
  import os
  import tensorflow
  from contextlib import contextmanager
  from nose import SkipTest
  from nvidia.dali.pipeline import Pipeline
  from tensorflow.python.client import device_lib
  from test_utils import to_array, get_dali_extra_path
label_desc: Use image node_id 13 for calling a global function with example usage: run_dataset_eager_mode(dali_datasets, iterations, to_stop_iter) and returns: results