code: def process_datagen(
      data_aug,
      train_array=None,
      train_directory=None,
      target_size=None,
      color_mode="rgb",
      flat_dir=False,
  ):
      # set generators for train and test
      if data_aug is not None:
          train_datagen = data_aug
          test_datagen = get_test_datagen(data_aug=data_aug)
      else:
          train_datagen = get_test_datagen()
          test_datagen = get_test_datagen()
  
      # compute statistics for normalization
      fit_datagens(
          train_datagen,
          test_datagen,
          train_array=train_array,
          train_directory=train_directory,
          target_size=target_size,
          color_mode=color_mode,
          flat_dir=flat_dir,
      )
  
      return (train_datagen, test_datagen)
  
imports: from ..None import utils
  from ..imports import *
  from .preprocessor import ImagePreprocessor
label_desc: Use image node_id 7 for calling a global function with example usage: process_datagen(data_aug, train_array, train_directory, target_size, color_mode, flat_dir) and returns: train_datagen,  test_datagen