code: def test_exception(self):
      criterion = kornia.losses.MS_SSIMLoss()
  
      with pytest.raises(TypeError) as errinfo:
          criterion(1, 2)
      assert "Input type is not a torch.Tensor. Got" in str(errinfo)
  
      with pytest.raises(TypeError) as errinfo:
          criterion(torch.rand(1), 2)
      assert "Output type is not a torch.Tensor. Got" in str(errinfo)
  
      with pytest.raises(ValueError) as errinfo:
          criterion(torch.rand(1), torch.rand(1, 2))
      assert "Input shapes should be same. Got" in str(errinfo)
  
imports: import pytest
  import torch
  from torch.autograd import gradcheck
  import kornia
  import kornia.testing
  from kornia.testing import BaseTester, assert_close
label_desc: Use image node_id 2 for calling the TestMS_SSIMLoss obj's underlying member method code with example usage: obj.test_exception() without return types