code: def optimizer_creator(model, config):
      return getattr(torch.optim, config.get("optim", "Adam"))(
          model.parameters(), lr=config.get("lr", 0.001)
      )
  
file_path: analytics-zoo/pyzoo/zoo/chronos/model/Seq2Seq_pytorch.py
imports: import torch
  import torch.nn
  from zoo.orca.automl.model.base_pytorch_model import PytorchBaseModel, PYTORCH_REGRESSION_LOSS_MAP
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: optimizer_creator(model, config) and returns: getattr