code: def test_assert_torch_all_close(self):
      test_fixture = ClassyTestCase()
  
      data = [1.1, 2.2]
      tensor_1 = torch.Tensor(data)
  
      # shouldn't raise an exception
      tensor_2 = tensor_1
      test_fixture.assertTorchAllClose(tensor_1, tensor_2)
  
      # should fail because tensors are not close
      tensor_2 = tensor_1 / 2
      with self.assertRaises(AssertionError):
          test_fixture.assertTorchAllClose(tensor_1, tensor_2)
  
      # should fail because tensor_2 is not a tensor
      tensor_2 = data
      with self.assertRaises(AssertionError):
          test_fixture.assertTorchAllClose(tensor_1, tensor_2)
  
      # should fail because tensor_1 is not a tensor
      tensor_1 = data
      tensor_2 = torch.Tensor(data)
      with self.assertRaises(AssertionError):
          test_fixture.assertTorchAllClose(tensor_1, tensor_2)
  
imports: import unittest
  import torch
  from test.generic.utils import ClassyTestCase
label_desc: Use image node_id 1 for calling the TestClassyTestCase obj's underlying member method code with example usage: obj.test_assert_torch_all_close() without return types