code: def peek_and_restore(generator):
      element = next(generator)
      return element, itertools.chain([element], generator)
  
file_path: keras/keras/trainers/data_adapters/generator_data_adapter.py
imports: import itertools
  import numpy
  import tree
  from keras.trainers.data_adapters.data_adapter import DataAdapter
label_desc: Use image node_id 1 for calling a global function with example usage: peek_and_restore(generator) and returns: element,  itertools