code: def test_averaged_model_all_devices(self) -> None:
      cpu = torch.device("cpu")
      self._test_averaged_model(cpu, cpu, ema=True)
      self._test_averaged_model(cpu, cpu, ema=False)
      if torch.cuda.is_available():
          cuda = torch.device(0)
          combos = itertools.product(
              [cuda, cpu], [cuda, cpu], [True, False]
          )
          for device1, device2, ema in combos:
              self._test_averaged_model(device1, device2, ema=ema)
  
file_path: tnt/tests/utils/test_swa.py
imports: import itertools
  import unittest
  from copy import deepcopy
  from typing import List, Tuple
  import torch
  from torchtnt.utils.swa import AveragedModel
label_desc: Use image node_id 3 for calling the TestSWA obj's underlying member method code with example usage: obj.test_averaged_model_all_devices() without return types