code: def load_model(self):
      logger.info("Loading model")
      if self.config.model in self.config.model_config:
          attributes = self.config.model_config[self.config.model]
      else:
          warnings.warn(
              f"Model {self.config.model}'s config not present. "
              + "Continuing with empty config"
          )
          attributes = OmegaConf.create()
      # Easy way to point to config for other model
      if isinstance(attributes, str):
          attributes = self.config.model_config[attributes]
  
      with omegaconf.open_dict(attributes):
          attributes.model = self.config.model
  
      self.model = build_model(attributes)
      self.model = self.model.to(self.device)
  
imports: import logging
  import warnings
  import omegaconf
  import torch
  from mmf.common.registry import registry
  from mmf.datasets.multi_datamodule import MultiDataModule
  from mmf.modules.metrics import Metrics
  from mmf.trainers.base_trainer import BaseTrainer
  from mmf.trainers.callbacks.checkpoint import CheckpointCallback
  from mmf.trainers.callbacks.early_stopping import EarlyStoppingCallback
  from mmf.trainers.callbacks.logistics import LogisticsCallback
  from mmf.trainers.callbacks.lr_scheduler import LRSchedulerCallback
  from mmf.trainers.core.callback_hook import TrainerCallbackHookMixin
  from mmf.trainers.core.device import TrainerDeviceMixin
  from mmf.trainers.core.evaluation_loop import TrainerEvaluationLoopMixin
  from mmf.trainers.core.profiling import TrainerProfilingMixin
  from mmf.trainers.core.training_loop import TrainerTrainingLoopMixin
  from mmf.utils.build import build_model, build_optimizer
  from mmf.utils.general import print_model_parameters
  from omegaconf import DictConfig, OmegaConf
  from packaging import version
label_desc: Use image node_id 5 for calling the MMFTrainer obj's underlying member method code with example usage: obj.load_model() without return types