code: def _setup(self, model, output_dir=None, saved_model=None):
      output_dir = "./" if output_dir is None else output_dir
      logger.info("output dir is {}".format(output_dir))
      resume_path = None
      if saved_model is not None:
          model_dict = load_model_dict_from_path(saved_model)
          logger.info("model is {}".format(model))
          model.load_state_dict(model_dict)
          logger.info(
              f"loading model dict from {saved_model} to model done"
          )
          if get_last_checkpoint(saved_model) is not None:
              resume_path = saved_model
              logger.info(
                  f"checkpoint detected, resume_path set to {resume_path}"
              )
  
      # load optimizer
      optimizer_loader = Loader.from_dict(self.optimizer_conf)
      optimizer_ = optimizer_loader.load_item()
      optimizer_params = optimizer_loader.kwargs
      optimizer = optimizer_(model.parameters(), **optimizer_params)
      # load loss
      loss = loader_load_from_conf(self.loss_conf)
      # load collator func
      data_collator = loader_load_from_conf(self.data_collator_conf)
      # load tokenizer if import conf provided
      tokenizer = loader_load_from_conf(self.tokenizer_conf)
      # args
      dir_warning(self.training_args_conf)
      training_args = TrainingArguments(**self.training_args_conf)
      training_args.output_dir = output_dir
      training_args.resume_from_checkpoint = resume_path  # resume path
  
      return optimizer, loss, data_collator, tokenizer, training_args
  
imports: import logging
  from fate.components.components.nn.loader import Loader
  from typing import Optional, Union, Dict, Literal
  from fate.arch.dataframe import DataFrame
  from fate.components.components.nn.nn_runner import NNRunner, loader_load_from_conf, load_model_dict_from_path, dir_warning, run_dataset_func
  from transformers.trainer_utils import get_last_checkpoint
  from fate.ml.nn.hetero.hetero_nn import HeteroNNTrainerGuest, HeteroNNTrainerHost, TrainingArguments
  from fate.ml.nn.model_zoo.hetero_nn_model import HeteroNNModelGuest, HeteroNNModelHost
  from fate.components.components.utils import consts
  from fate.ml.nn.dataset.table import TableDataset, Dataset
  from fate.ml.nn.model_zoo.hetero_nn_model import FedPassArgument, StdAggLayerArgument, parse_agglayer_conf, TopModelStrategyArguments
label_desc: Use image node_id 3 for calling the DefaultRunner obj's underlying member method code with example usage: obj._setup(model, output_dir, saved_model) and returns: optimizer,  loss,  data_collator,  tokenizer,  training_args