code: def compare_samples(test_fixture, sample1, sample2):
      test_fixture.assertEqual(sample1.keys(), sample2.keys())
      test_fixture.assertTrue(torch.is_tensor(sample1["input"]))
      test_fixture.assertTrue(torch.is_tensor(sample2["input"]))
      test_fixture.assertTrue(torch.is_tensor(sample1["target"]))
      test_fixture.assertTrue(torch.is_tensor(sample2["target"]))
  
      test_fixture.assertTrue(
          torch.allclose(sample1["input"], sample2["input"])
      )
      test_fixture.assertTrue(
          torch.allclose(sample1["target"], sample2["target"])
      )
  
imports: import os
  import unittest
  from functools import wraps
  import torch
  from classy_vision.hooks import ClassyHook
  from classy_vision.tasks import ClassyTask
  from classy_vision.trainer import ClassyTrainer
label_desc: Use image node_id 9 for calling a global function with example usage: compare_samples(test_fixture, sample1, sample2) without return types