code: def to_bigdl_optim_method(optimizer):
      optimizer = optimizer.lower()
      if optimizer == "adagrad":
          return Adagrad(learningrate=0.01)
      elif optimizer == "sgd":
          return SGD(learningrate=0.01)
      elif optimizer == "adam":
          return Adam()
      elif optimizer == "rmsprop":
          return RMSprop(learningrate=0.001, decayrate=0.9)
      elif optimizer == "adadelta":
          return Adadelta(decayrate=0.95, epsilon=1e-8)
      elif optimizer == "adamax":
          return Adamax(epsilon=1e-8)
      else:
          raise TypeError("Unsupported optimizer: %s" % optimizer)
  
imports: from bigdl.optim.optimizer import *
  from zoo.pipeline.api.keras.objectives import *
  from zoo.pipeline.api.keras import metrics
label_desc: Use image node_id 1 for calling a global function with example usage: to_bigdl_optim_method(optimizer) and returns: Adagrad, SGD, Adam, RMSprop, Adadelta, Adamax