code: def class_factory(classname: str, params_dict: dict = None):
      """
      Instantiate a class with given parameters
      :param classname:       Name of class
      :param params_dict:     Dict of parameters
      :return:
      """
      if params_dict is None:
          params_dict = {}
      cls = globals()[classname]
      return cls(**params_dict)
  
imports: import pickle
  import random
  from .optimizers import *
  from .callbacks import *
  import torch
  from pywick.callbacks import *
label_desc: Use image node_id 22 for calling a global function with example usage: class_factory(classname, params_dict) and returns: cls