code: def optim_creator(model, config):
      optimizer = optim.Adam(
          model.parameters(), lr=config.get("lr", 0.001)
      )
      return optimizer
  
file_path: BigDL/python/friesian/example/dien/pytorch/dien_train.py
imports: from dienl import SparseFeat, VarLenSparseFeat, DIEN
  import torch.nn
  import torch.optim
  from bigdl.orca.learn.pytorch import Estimator
  from bigdl.orca import init_orca_context, stop_orca_context
  from bigdl.orca.learn.metrics import Accuracy, BinaryCrossEntropy
  from bigdl.friesian.feature import FeatureTable
  from pyspark.sql.window import Window
  from pyspark.sql.functions import desc, rank, col
  import argparse
  from bigdl.dllib.utils.log4Error import *
label_desc: Use image node_id 2 for calling a global function with example usage: optim_creator(model, config) and returns: optimizer