code: def test_freeze_unet2d(self):
      (
          init_dict,
          inputs_dict,
      ) = self.prepare_init_args_and_inputs_for_common()
      model = self.model_class(**init_dict)
      model.freeze_unet2d_params()
  
      for param_name, param_value in model.named_parameters():
          if "motion_modules" not in param_name:
              self.assertFalse(param_value.requires_grad)
  
          else:
              self.assertTrue(param_value.requires_grad)
  
imports: import copy
  import os
  import tempfile
  import unittest
  import numpy
  import torch
  from diffusers import MotionAdapter, UNet2DConditionModel, UNetMotionModel
  from diffusers.utils import logging
  from diffusers.utils.import_utils import is_xformers_available
  from diffusers.utils.testing_utils import enable_full_determinism, floats_tensor, torch_device
  from .test_modeling_common import ModelTesterMixin, UNetTesterMixin
label_desc: Use image node_id 6 for calling the UNetMotionModelTests obj's underlying member method code with example usage: obj.test_freeze_unet2d() without return types