code: def clone_optimizer(optimizer):
      if type(optimizer) is str:
          return optimizers.get(optimizer)
      # Requires Keras 1.0.7 since get_config has breaking changes.
      params = dict([(k, v) for k, v in optimizer.get_config().items()])
      config = {
          "class_name": optimizer.__class__.__name__,
          "config": params,
      }
      if hasattr(optimizers, "optimizer_from_config"):
          # COMPATIBILITY: Keras < 2.0
          clone = optimizers.optimizer_from_config(config)
      else:
          clone = optimizers.deserialize(config)
      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 2 for calling a global function with example usage: clone_optimizer(optimizer) and returns: clone, optimizers