code: def test_heads(self):
      model = models.resnet50(pretrained=False)
      classy_model = ClassyModel.from_model(model)
      num_classes = 5
      head = FullyConnectedHead(
          unique_id="default", in_plane=2048, num_classes=num_classes
      )
      classy_model.set_heads({"layer4": [head]})
      input = torch.ones((1, 3, 224, 224))
      self.assertEqual(classy_model(input).shape, (1, num_classes))
  
imports: import copy
  import os
  import shutil
  import tempfile
  import unittest
  import torch
  import torch.nn
  from classy_vision.generic.util import load_checkpoint
  from classy_vision.heads import FullyConnectedHead, IdentityHead
  from classy_vision.hooks import CheckpointHook
  from classy_vision.models import build_model, ClassyModel, ClassyModelWrapper, register_model
  from classy_vision.models.classy_model import _ClassyModelAdapter
  from classy_vision.tasks import build_task
  from classy_vision.trainer import LocalTrainer
  from test.generic.config_utils import get_fast_test_task_config, get_test_task_config
  from torchvision import models
label_desc: Use image node_id 4 for calling the TestClassyModelAdapter obj's underlying member method code with example usage: obj.test_heads() without return types