code: def build(self):
      # Get any cross-model info we need for building network
      # (like hidden sizes)
      extra_config = {}
      extra_config["vb_hid_sz"] = self.config.visual_bert.hidden_size
      extra_config[
          "node_hid_dim"
      ] = self.config.graph_module.node_hid_dim
  
      # Also pass arguments to know if it needs to feed in something
      extra_config["feed_vb_to_graph"] = self.config.feed_vb_to_graph
      extra_config["feed_q_to_graph"] = self.config.feed_q_to_graph
      extra_config["feed_mode"] = self.config.feed_mode
      extra_config["feed_graph_to_vb"] = self.config.feed_graph_to_vb
      extra_config["feed_special_node"] = self.config.feed_special_node
      extra_config["topk_ans_feed"] = self.config.topk_ans_feed
      extra_config[
          "compress_crossmodel"
      ] = self.config.compress_crossmodel
      extra_config[
          "crossmodel_compress_dim"
      ] = self.config.crossmodel_compress_dim
      extra_config["analysis_mode"] = self.config.analysis_mode
      extra_config["noback_vb"] = self.config.noback_vb_to_graph
  
      # If feed q, make the question module here
      if self.config.feed_q_to_graph:
          # We can just make it a BERT model really easily
          self.q_enc = BertModel.from_pretrained("bert-base-uncased")
          extra_config["q_hid_sz"] = self.q_enc.config.hidden_size
  
      # Import graph network module
      # Putting in try-catch to avoid adding dependencies to mmf
      try:
          from projects.krisp.graphnetwork_module import (
              GraphNetworkModule,
          )
      except Exception:
          print(
              "Import error with KRISP dependencies. Fix dependencies if "
              + "you want to use KRISP"
          )
          raise
      # Builds the graph network module
      self.graph_module = GraphNetworkModule(
          self.config.graph_module, extra_config
      )
  
      # Make VisualBERT module (without the final hidden logit layer)
      self.vb_module = VisualBERTModule(
          self.config.visual_bert, extra_config
      )
  
      # Final hidden layer for the vb module
      self.vocab_fc = nn.Linear(
          self.vb_module.model.bert.config.hidden_size,
          self.config.num_labels,
      )
  
      # There's whether to use the bilinear and then whether to add or concat features
      # These are not mutally exclusive really
      # If output combine is ptr net, make GraphPtr Net for combining outputs
      if self.config.graph_logit_mode == "mc4":
          # Bilinear network
          self.graph_ptr_net = GraphPtrNet(
              self.vb_module.model.bert.config.hidden_size,
              self.config.graph_module.node_hid_dim,
          )
      elif self.config.graph_logit_mode == "in_graph":
          # Logits is already computed
          pass
      elif self.config.graph_logit_mode == "logit_fc":
          # Compute logits from single hidden layer
          self.graph_logit_fc = nn.Linear(
              self.config.graph_module.node_hid_dim,
              self.config.num_labels,
          )
  
      # Answer indices not in graph
      if self.config.output_combine == "add":
          self.missing_ans_inds = torch.LongTensor(
              self.config.num_labels
          ).fill_(1)
          self.missing_ans_inds[self.graph_module.index_in_ans] = 0
  
imports: import logging
  import math
  import os
  import torch
  from mmf.common.registry import registry
  from mmf.models import BaseModel
  from mmf.modules.embeddings import BertVisioLinguisticEmbeddings
  from mmf.utils.configuration import get_mmf_cache_dir
  from mmf.utils.file_io import PathManager
  from mmf.utils.modeling import get_optimizer_parameters_for_bert
  from mmf.utils.transform import transform_to_batch_sequence, transform_to_batch_sequence_dim
  from omegaconf import OmegaConf
  from torch import nn
label_desc: Use image node_id 3 for calling the KRISP obj's underlying member method code with example usage: obj.build() without return types