code: def test_from_checkpoint(self):
      config = get_test_task_config()
      for use_head in [True, False]:
          config["model"] = self.get_model_config(use_head)
          task = build_task(config)
          task.prepare()
  
          checkpoint_folder = f"{self.base_dir}/{use_head}/"
          input_args = {"config": config}
  
          # Simulate training by setting the model parameters to zero
          for param in task.model.parameters():
              param.data.zero_()
  
          checkpoint_hook = CheckpointHook(
              checkpoint_folder, input_args, phase_types=["train"]
          )
  
          # Create checkpoint dir, save checkpoint
          os.mkdir(checkpoint_folder)
          checkpoint_hook.on_start(task)
  
          task.train = True
          checkpoint_hook.on_phase_end(task)
  
          # Model should be checkpointed. load and compare
          checkpoint = load_checkpoint(checkpoint_folder)
  
          model = ClassyModel.from_checkpoint(checkpoint)
          self.assertTrue(isinstance(model, MyTestModel))
  
          # All parameters must be zero
          for param in model.parameters():
              self.assertTrue(torch.all(param.data == 0))
  
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 5 for calling the TestClassyModel obj's underlying member method code with example usage: obj.test_from_checkpoint() without return types