code: def auto_generate_model(modeldir):
      if modeldir is not None:
          hdf5_files = [
              (p, os.path.getmtime(p))
              for p in glob.glob(modeldir + "/*.hdf*")
              + glob.glob(modeldir + "/*.h5")
          ]
          if any(hdf5_files):
              # experiment type - keras
              get_logger().info(
                  "Loading keras model "
                  + "(using pickle serialization)"
              )
              import keras
  
              last_checkpoint = max(hdf5_files, key=lambda t: t[1])[0]
              keras_model = keras.models.load_model(last_checkpoint)
              print(keras_model)
              keras_model.summary()
              return wrap_keras_model(keras_model)
  
      return lambda x: x
  
imports: import argparse
  import sys
  import os
  import time
  import json
  import glob
  import traceback
  import importlib
  import pickle
  import re
  import threading
  from flask import Flask, request
  from studio import fs_tracker, logs
  from .model_util import ModelPipe
label_desc: Use image node_id 5 for calling a global function with example usage: auto_generate_model(modeldir) and returns: function, wrap_keras_model