code: def forward(self, sample_list):
      detr_outputs = {}
      task_type = self.get_task_type(sample_list.dataset_name)
      text_src = None
      text_mask = None
      text_pos = None
      img_src = None
      if task_type == "vl" or task_type == "glue":
          if task_type == "vl":
              img_src = sample_list.image
          text_src, pos_embeddings = self.forward_bert_with_task_idx(
              sample_list
          )
          # 768 -> 256
          text_src = self.bert_projection(text_src)
          text_pos = self.bert_pos_projection(pos_embeddings)
  
          text_mask = sample_list.input_mask
          if self.config.keep_only_bert_cls[task_type][
              sample_list.dataset_name
          ]:
              # take only the [CLS] token's hidden state
              text_src = text_src[:, 0:1, :]
              text_pos = text_pos[0:1, :]
              text_mask = text_mask[:, 0:1]
      elif task_type == "detection":
          img_src = sample_list.image
  
      detr_outputs = self.unit_base_model(
          img_src=img_src,
          text_src=text_src,
          text_mask=text_mask,
          text_pos=text_pos,
          task_type=task_type,
          dataset_name=sample_list.dataset_name,
          task_idx=self.get_task_idx(sample_list.dataset_name),
      )
  
      output = self.loss_calculation_fn[task_type](
          detr_outputs, sample_list
      )
      return output
  
imports: import logging
  from copy import deepcopy
  from typing import Dict
  import torch
  from mmf.common.registry import registry
  from mmf.models import BaseModel
  from mmf.models.unit.unit_base_model import AttributeHead, build_detection_loss, MLP, UniTBaseModel
  from mmf.modules.encoders import TransformerEncoder
  from mmf.utils.distributed import byte_tensor_to_object
  from torch import nn, Tensor
label_desc: Use image node_id 6 for calling the UniT obj's underlying member method code with example usage: obj.forward(sample_list) and returns: output