code: def test_algo(self):
      with self.assertRaises(RuntimeError):
          x = torch.randn(
              20, 16, 50, 44, 31, requires_grad=True, device="cuda:0"
          )
          y = torch.nn.AvgPool3d((3, 2, 2), stride=(2, 1, 2))(x)
          y.sum().backward()
  
file_path: MONAI/tests/test_set_determinism.py
imports: from __future__ import annotations
  import unittest
  import numpy
  import torch
  from monai.utils import get_seed, set_determinism
  from tests.utils import SkipIfBeforePyTorchVersion, skip_if_no_cuda
label_desc: Use image node_id 2 for calling the TestSetFlag obj's underlying member method code with example usage: obj.test_algo() without return types