code: def _load_trainer(self):
      lightning_params = self.trainer_config
      with omegaconf.open_dict(lightning_params):
          lightning_params.pop("max_steps")
          lightning_params.pop("max_epochs")
          lightning_params.pop("resume_from_checkpoint")
  
      lightning_params_dict = OmegaConf.to_container(
          lightning_params, resolve=True
      )
      self.trainer = Trainer(
          callbacks=self.callbacks,
          max_steps=self._max_updates,
          resume_from_checkpoint=self.resume_from_checkpoint,
          default_root_dir=get_mmf_env(key="log_dir"),
          **lightning_params_dict,
      )
  
imports: import logging
  import math
  import os
  from typing import Any, Dict, List, Optional
  import omegaconf
  from mmf.common.registry import registry
  from mmf.datasets.lightning_multi_datamodule import LightningMultiDataModule
  from mmf.modules.metrics import Metrics
  from mmf.trainers.base_trainer import BaseTrainer
  from mmf.trainers.lightning_core.loop_callback import LightningLoopCallback
  from mmf.trainers.lightning_core.loop_callback_with_torchmetrics import LightningTorchMetricsCallback
  from mmf.trainers.lightning_core.torchmetric import LightningTorchMetrics
  from mmf.utils.build import build_lightning_model
  from mmf.utils.checkpoint import get_ckpt_from_path, get_ckpt_path_from_folder, get_config_from_folder_or_ckpt
  from mmf.utils.checkpoint_updater import is_model_only_checkpoint
  from mmf.utils.configuration import get_mmf_env
  from mmf.utils.download import download_pretrained_model
  from mmf.utils.file_io import PathManager
  from mmf.utils.general import get_max_updates, print_model_parameters
  from mmf.utils.logger import setup_output_folder, TensorboardLogger
  from omegaconf import DictConfig, OmegaConf
  from pytorch_lightning import seed_everything, Trainer
  from pytorch_lightning.callbacks import ModelCheckpoint
label_desc: Use image node_id 3 for calling the LightningTrainer obj's underlying member method code with example usage: obj._load_trainer() without return types