class_docstr: This class tests the crypten.models package.
code: def _check_parameters(
      self, crypten_model, torchvision_model, pretrained, msg
  ):
      msg += " in parameters."
      if pretrained:
          msg = f"Pretrained {msg}"
  
      # Test parameters()
      crypten_params = [p for p in crypten_model.parameters()]
      torchvision_params = [p for p in torchvision_model.parameters()]
      self.assertEqual(
          len(crypten_params), len(torchvision_params), msg
      )
      for i, crypten_param in enumerate(crypten_params):
          torchvision_param = torchvision_params[i]
  
          self.assertEqual(
              crypten_param.size(), torchvision_param.size(), msg
          )
          if pretrained:
              if isinstance(crypten_param, crypten.CrypTensor):
                  crypten_param = crypten_param.get_plain_text()
              self.assertTrue(
                  torch.allclose(
                      crypten_param, torchvision_param, atol=1e-4
                  )
              )
  
      # Test named_parameters()
      crypten_named_params = dict(crypten_model.named_parameters())
      torchvision_named_params = dict(
          torchvision_model.named_parameters()
      )
      self.assertEqual(
          len(crypten_named_params), len(torchvision_named_params)
      )
      for name, crypten_param in crypten_named_params.items():
          self.assertTrue(name in torchvision_named_params, msg)
          torchvision_param = torchvision_named_params[name]
  
          self.assertEqual(
              crypten_param.size(),
              torchvision_param.size(),
              f"{msg}: {name} size",
          )
          if pretrained:
              if isinstance(crypten_param, crypten.CrypTensor):
                  crypten_param = crypten_param.get_plain_text()
              self.assertTrue(
                  torch.allclose(
                      crypten_param, torchvision_param, atol=1e-4
                  ),
                  f"{msg}: {name}",
              )
  
imports: import unittest
  import crypten
  import torch
  import torchvision
  from test.multiprocess_test_case import MultiProcessTestCase
label_desc: Use image node_id 3 for calling the TestModels obj's underlying member method code with example usage: obj._check_parameters(crypten_model, torchvision_model, pretrained, msg) without return types