code: def test_hk_shim(self, module):
      if not hasattr(module, "hk"):
          self.skipTest(f"No `hk` in {module}")
  
      shim_hk = module.hk
      for name in dir(shim_hk):
          if name.startswith("_"):
              continue
  
          shim_value = getattr(shim_hk, name)
          if not hasattr(hk, name):
              raise ValueError(
                  f"`hk.{name}` is not part of the actual Haiku API"
              )
  
          actual_value = getattr(hk, name)
          if isinstance(actual_value, types.ModuleType):
              # Most shimmed submodules are instance of types.ModuleType, but some
              # are nested classes, e.g. `hk.pad`.
              self.assertIsInstance(
                  shim_value, (type, types.ModuleType)
              )
          else:
              self.assertEqual(actual_value, shim_value)
  
file_path: dm-haiku/haiku/_src/integration/shim_hk_test.py
imports: import importlib
  import types
  from absl.testing import absltest
  from absl.testing import parameterized
  import haiku
label_desc: Use image node_id 1 for calling the ShimHkTest obj's underlying member method code with example usage: obj.test_hk_shim(module) without return types