code: def test_vit_encoder(self):
      from omegaconf import open_dict
  
      config = OmegaConf.structured(encoders.ViTEncoder.Config())
      with open_dict(config):
          config.update(
              {
                  "layer_norm_eps": 0.0001,
                  "hidden_size": 768,
                  "num_hidden_layers": 2,
                  "do_patch_embeddings": False,
                  "add_pooling_layer": False,
                  "out_dim": 768,
              }
          )
      encoder = encoders.ViTEncoder(config)
      x = torch.rand(32, 197, 768)
      output, _ = encoder(x)
      self.assertEqual(output.size(-1), config.out_dim)
  
imports: import tempfile
  import unittest
  import torch
  from mmf.modules import encoders
  from omegaconf import OmegaConf
  from tests.test_utils import setup_proxy, skip_if_no_pytorchvideo, skip_if_old_transformers
  from torch import nn
label_desc: Use image node_id 12 for calling the TestEncoders obj's underlying member method code with example usage: obj.test_vit_encoder() without return types