code: def convert_to_ndarray(ImageGenerator):
      return ImageGenerator.next()[0]
  
imports: import os
  import tensorflow.compat.v1
  from tensorflow import keras
label_desc: Use image node_id 1 for calling a global function with example usage: convert_to_ndarray(ImageGenerator) and returns: ImageGenerator