code: def _compare_results(self, obtained, expected) -> None:
      if isinstance(expected, dict):
          self.assertIsInstance(obtained, dict)
          for key in expected:
              self._compare_results(obtained[key], expected[key])
      elif isinstance(expected, tuple):
          self.assertIsInstance(obtained, tuple)
          for i in range(len(expected)):
              self._compare_results(obtained[i], expected[i])
      else:
          assertTensorAlmostEqual(self, obtained, expected)
  
imports: import collections
  from typing import List
  import torch
  from captum.robust import AttackComparator, FGSM
  from tests.helpers.basic import assertTensorAlmostEqual, BaseTest
  from tests.helpers.basic_models import BasicModel, BasicModel_MultiLayer
  from torch import Tensor
label_desc: Use image node_id 4 for calling the Test obj's underlying member method code with example usage: obj._compare_results(obtained, expected) without return types