code: def get_trainer(model_name):
      r"""Automatically select trainer class based on model type and model name
  
      Notes:
          model_name should be original string (typically is upper case) like "BART"
  
      Args:
          model_name (str): model name
  
      Returns:
          ~textbox.trainer.trainer.Trainer: trainer class
      """
      try:
          return getattr(
              importlib.import_module("textbox.trainer.trainer"),
              model_name + "Trainer",
          )
      except AttributeError:
          return getattr(
              importlib.import_module("textbox.trainer.trainer"),
              "Trainer",
          )
  
imports: import os
  import datetime
  import importlib
  from accelerate.logging import get_logger
  from typing import Union, Optional
  import shutil
  import torch
  from accelerate.utils import set_seed
  from transformers import AutoTokenizer, BertTokenizer
  from .enum_type import PLM_MODELS, RNN_MODELS
label_desc: Use image node_id 10 for calling a global function with example usage: get_trainer(model_name) and returns: getattr, getattr