code: def test_model_static_constructor_from_config(self):
      config = OmegaConf.create(
          {
              "pretrained_model_name": "google/vit-base-patch16-224",
              "do_patch_embeddings": False,
              "add_pooling_layer": False,
              "return_dict": True,
          }
      )
      pretrained_model, _ = ViTModel.from_config(config)
      embeddings = torch.rand(32, 197, 768)
      output = pretrained_model(embeddings, output_hidden_states=False)
  
      self.assertTrue(hasattr(output, "last_hidden_state"))
      self.assertEqual(
          output["last_hidden_state"].shape, torch.Size([32, 197, 768])
      )
  
file_path: mmf/tests/modules/test_vit.py
imports: import unittest
  import torch
  from mmf.modules.vit import ViTModel
  from omegaconf import OmegaConf
  from tests.test_utils import setup_proxy, skip_if_old_transformers
  from torch import nn
label_desc: Use image node_id 2 for calling the TestViT obj's underlying member method code with example usage: obj.test_model_static_constructor_from_config() without return types