code: def _test_model(
      self,
      model_config,
      image_size=224,
      expected_out_dims=1000,
      test_forward_pass=True,
  ):
      model = build_model(model_config)
  
      if not test_forward_pass:
          return
  
      # Verify forward pass works
      input = torch.ones([2, 3, image_size, image_size])
      output = model.forward(input)
      self.assertEqual(output.size(), (2, expected_out_dims))
  
      # Verify get_set_state
      new_model = build_model(model_config)
      state = model.get_classy_state()
      new_model.set_classy_state(state)
      new_state = new_model.get_classy_state()
  
      compare_model_state(self, state, new_state, check_heads=True)
  
file_path: ClassyVision/test/models_vision_transformer_test.py
imports: import copy
  import unittest
  import torch
  from classy_vision.models import build_model
  from test.generic.utils import compare_model_state
label_desc: Use image node_id 4 for calling the TestVisionTransformer obj's underlying member method code with example usage: obj._test_model(model_config, image_size, expected_out_dims, test_forward_pass) without return types