code: def build(self):
      if self.config.training_head_type == "pretraining":
          self.model = MMBTForPreTraining(self.config)
      else:
          self.model = MMBTForClassification(self.config)
  
      if self.config.freeze_complete_base or self.config.freeze_text:
          for p in self.model.bert.mmbt.transformer.parameters():
              p.requires_grad = False
  
      if self.config.freeze_complete_base or self.config.freeze_modal:
          for p in self.model.bert.mmbt.modal_encoder.parameters():
              p.requires_grad = False
  
imports: import os
  from copy import deepcopy
  from dataclasses import dataclass
  from typing import Dict, Optional, Union
  import torch
  from mmf.common.registry import registry
  from mmf.models.base_model import BaseModel
  from mmf.models.interfaces.mmbt import MMBTGridHMInterface
  from mmf.modules.encoders import EncoderFactory, ImageEncoderFactory, ImageEncoderTypes, MultiModalEncoderBase, ResNet152ImageEncoder, TextEncoderFactory, TextEncoderTypes, TransformerEncoder
  from mmf.modules.hf_layers import replace_with_jit
  from mmf.utils.checkpoint import load_pretrained_model
  from mmf.utils.configuration import get_mmf_cache_dir
  from mmf.utils.modeling import get_optimizer_parameters_for_bert
  from omegaconf import DictConfig, II, OmegaConf
  from torch import nn, Tensor
label_desc: Use image node_id 2 for calling the MMBT obj's underlying member method code with example usage: obj.build() without return types