code: def _ensure_module_unchanged(self, module, message):
      orig_parameters, orig_buffers = tuple(module.parameters()), tuple(
          module.buffers()
      )
      orig_tensors = orig_parameters + orig_buffers
      orig_tensors_values = tuple(t.clone() for t in orig_tensors)
      try:
          yield module
      finally:
          parameters, buffers = tuple(module.parameters()), tuple(
              module.buffers()
          )
          self.assertTrue(
              len(parameters) == len(orig_parameters)
              and len(buffers) == len(orig_buffers)
              and all(
                  t1 is t2 and torch.allclose(t1, t3)
                  for t1, t2, t3 in zip(
                      orig_tensors,
                      parameters + buffers,
                      orig_tensors_values,
                  )
              ),
              message,
          )
  
imports: import contextlib
  import os
  import re
  import subprocess
  import sys
  import unittest
  import torch
  import torch.nn.utils.stateless
  from torch.testing._internal.common_cuda import TEST_MULTIGPU
  from torch.testing._internal.common_utils import run_tests, TestCase, parametrize, instantiate_parametrized_tests, subtest
label_desc: Use image node_id 2 for calling the TestStatelessFunctionalAPI obj's underlying member method code with example usage: obj._ensure_module_unchanged(module, message) without return types