code: def data_wrap(x, y=None, batch_size=32):
      if isinstance(x, Iterator):
          return x
      elif isinstance(x, TFEPrivateTensor) and isinstance(
          y, TFEPrivateTensor
      ):
  
          def iter_over_data(x_data, y_data, batch_size):
              start_index = 0
              end_index = batch_size
              while start_index < x_data[0].shape[0]:
                  yield (
                      x_data[start_index:end_index],
                      y_data[start_index:end_index],
                  )
                  start_index += batch_size
                  end_index += batch_size
  
          data_iter = iter_over_data(x, y, batch_size)
          return data_iter
      elif isinstance(x, list) and isinstance(y, TFEPrivateTensor):
  
          def iter_over_data(x_data, y_data, batch_size):
              start_index = 0
              end_index = batch_size
              while start_index < x_data[0].shape[0]:
                  x_batch_data = []
                  for x in x_data:
                      x_batch_data.append(x[start_index:end_index])
                  yield (x_batch_data, y_data[start_index:end_index])
                  start_index += batch_size
                  end_index += batch_size
  
          data_iter = iter_over_data(x, y, batch_size)
          return data_iter
      elif isinstance(x, TFEPrivateTensor):
  
          def iter_over_data(x_data, batch_size):
              start_index = 0
              end_index = batch_size
              while start_index < x_data.shape[0]:
                  yield x_data[start_index:end_index]
                  start_index += batch_size
                  end_index += batch_size
  
          data_iter = iter_over_data(x, batch_size)
          return data_iter
      elif isinstance(x, list):
  
          def iter_over_data(x_data, batch_size):
              start_index = 0
              end_index = batch_size
              while start_index < x_data[0].shape[0]:
                  x_batch_data = []
                  for x in x_data:
                      x_batch_data.append(x[start_index:end_index])
                  yield x_batch_data
                  start_index += batch_size
                  end_index += batch_size
  
          data_iter = iter_over_data(x, batch_size)
          return data_iter
      else:
          raise ValueError(
              "Inputs could be two private tfe tensor \
              for 'x' and 'y' or generater generate ('x', 'y')."
          )
  
imports: import time
  from abc import abstractmethod
  from typing import Iterator
  import numpy
  import tensorflow
  from tensorflow.keras import utils
  import tf_encrypted
  from tf_encrypted.keras.engine.base_layer import Layer
  from tf_encrypted.protocol.protocol import TFEPrivateTensor
label_desc: Use image node_id 1 for calling a global function with example usage: data_wrap(x, y, batch_size) and returns: x, data_iter, data_iter, data_iter, data_iter