code: def test_view_with_multi_output(self):
      x = torch.randn(2, 2, 2, dtype=torch.double)
  
      x1 = torch.view_as_complex(x)
      # Taking an invalid view should always be allowed as long as it is not
      # modified inplace
      res = x1.unbind(0)
  
      with self.assertRaisesRegex(
          RuntimeError,
          "output of a function that returns multiple views",
      ):
          res[0] += torch.rand(2, requires_grad=True)
  
      x.requires_grad_(True)
      x1 = torch.view_as_complex(x)
      # Taking an invalid view should always be allowed as long as it is not
      # modified inplace
      res = x1.unbind(0)
  
      with self.assertRaisesRegex(
          RuntimeError,
          "output of a function that returns multiple views",
      ):
          res[0] += torch.rand(2, requires_grad=True)
  
imports: import torch
  from torch.testing._internal.common_utils import TestCase, run_tests, gradcheck
label_desc: Use image node_id 2 for calling the TestAutogradComplex obj's underlying member method code with example usage: obj.test_view_with_multi_output() without return types