code: def _compare_state_dict(self, state_1, state_2, check_heads=True):
      for k in state_1.keys():
          self.assertTrue(
              torch.allclose(state_1[k].cpu(), state_2[k].cpu())
          )
  
imports: import copy
  import unittest
  from typing import Any, Dict
  from unittest import mock
  import torch
  import torch.nn
  from classy_vision.generic.util import get_checkpoint_dict
  from classy_vision.losses import ClassyLoss, register_loss
  from classy_vision.tasks import build_task, FineTuningTask
  from classy_vision.trainer import LocalTrainer
  from test.generic.config_utils import get_fast_test_task_config
  from test.generic.utils import compare_model_state
  from torch.nn.modules.loss import CrossEntropyLoss
label_desc: Use image node_id 2 for calling the TestFineTuningTask obj's underlying member method code with example usage: obj._compare_state_dict(state_1, state_2, check_heads) without return types