code: def optimizer_creator(model, config):
      return getattr(torch.optim, config.get("optim", "Adam"))(
          model.parameters(), lr=config.get("lr", 0.001)
      )
  
imports: import pickle
  import random
  from time import time
  from typing import Union
  import numpy
  import torch
  from torch import nn, optim
  from torch.nn import functional
  from torch.nn.functional import mse_loss, l1_loss, binary_cross_entropy, cross_entropy
  from torch.optim import Optimizer
  from .utils import PYTORCH_REGRESSION_LOSS_MAP
  from pytorch_lightning import seed_everything
label_desc: Use image node_id 5 for calling a global function with example usage: optimizer_creator(model, config) and returns: getattr