class_docstr: This class tests the crypten.models package.
code: def _check_modules(self, crypten_model, torchvision_model, msg):
      msg += " in modules."
  
      # Check modules()
      crypten_modules = [m for m in crypten_model.modules()]
      torchvision_modules = [m for m in torchvision_model.modules()]
      self.assertTrue(
          len(crypten_modules) == len(torchvision_modules), msg
      )
      for i, module in enumerate(crypten_modules):
          self.assertEqual(
              type(module).__name__,
              type(torchvision_modules[i]).__name__,
              msg,
          )
  
      # Check named_modules()
      crypten_named_modules = dict(crypten_model.named_modules())
      torchvision_named_modules = dict(
          torchvision_model.named_modules()
      )
  
      self.assertEqual(
          len(crypten_named_modules),
          len(torchvision_named_modules),
          msg,
      )
      for k in crypten_named_modules.keys():
          self.assertTrue(k in torchvision_named_modules, msg)
  
imports: import unittest
  import crypten
  import torch
  import torchvision
  from test.multiprocess_test_case import MultiProcessTestCase
label_desc: Use image node_id 2 for calling the TestModels obj's underlying member method code with example usage: obj._check_modules(crypten_model, torchvision_model, msg) without return types