code: def test_shadow_params_not_updated(self):
      unet, ema_unet = self.get_models()
      # Since the `unet` is not being updated (i.e., backprop'd)
      # there won't be any difference between the `params` of `unet`
      # and `ema_unet` even if we call `ema_unet.step(unet.parameters())`.
      ema_unet.step(unet.parameters())
      orig_params = list(unet.parameters())
      for s_param, param in zip(ema_unet.shadow_params, orig_params):
          assert torch.allclose(s_param, param)
  
      # The above holds true even if we call `ema.step()` multiple times since
      # `unet` params are still not being updated.
      for _ in range(4):
          ema_unet.step(unet.parameters())
      for s_param, param in zip(ema_unet.shadow_params, orig_params):
          assert torch.allclose(s_param, param)
  
file_path: llmga/llmga/diffusers/tests/others/test_ema.py
imports: import tempfile
  import unittest
  import torch
  from diffusers import UNet2DConditionModel
  from diffusers.training_utils import EMAModel
  from diffusers.utils.testing_utils import enable_full_determinism, skip_mps, torch_device
label_desc: Use image node_id 5 for calling the EMAModelTests obj's underlying member method code with example usage: obj.test_shadow_params_not_updated() without return types