code: def forward(self, x, *args, **kwargs):
      x = self.encoder(x, *args, **kwargs)
      # Case of bert encoder, we only need pooled output
      if isinstance(x, collections.abc.Sequence) and len(x) >= 2:
          x = x[1]
  
      x = torch.flatten(x, start_dim=1)
  
      return x
  
imports: import collections
  from copy import deepcopy
  import torch
  from mmf.common.registry import registry
  from mmf.models.base_model import BaseModel
  from mmf.modules.encoders import MultiModalEncoderBase
  from mmf.utils.build import build_classifier_layer
label_desc: Use image node_id 3 for calling the UnimodalBase obj's underlying member method code with example usage: obj.forward(x) and returns: x