code: def test_image_generator():
      # Generates an iterator over images
      with tf.compat.v1.Session() as sess:
          input_data = tf.compat.v1.data.make_one_shot_iterator(
              dataset.test(flags.data_dir)
          ).get_next()
          try:
              while True:
                  yield sess.run(input_data)
          except tf.errors.OutOfRangeError:
              pass
  
imports: import numpy
  import tensorflow
  from tensorflow.lite.tutorials import dataset
label_desc: Use image node_id 1 for calling a global function with example usage: test_image_generator() without return types