code: def clone_model(model, custom_objects={}):
      # Requires Keras 1.0.7 since get_config has breaking changes.
      config = {
          "class_name": model.__class__.__name__,
          "config": model.get_config(),
      }
      clone = model_from_config(config, custom_objects=custom_objects)
      clone.set_weights(model.get_weights())
      return clone
  
imports: import numpy
  from keras.models import model_from_config, Sequential, Model, model_from_config
  import keras.optimizers
  import keras.backend
label_desc: Use image node_id 1 for calling a global function with example usage: clone_model(model, custom_objects) and returns: clone