code: def test_checkpoint_format(
      self, name, module_fn: ModuleFn, shape, dtype
  ):
      descriptor = descriptors.ModuleDescriptor(
          name, module_fn, shape, dtype
      )
      cls = descriptors.module_type(descriptor.create)
      expected = checkpoint_utils.summarize(descriptor)
      file_path = os.path.join(
          "haiku/_src/integration/checkpoints/",
          descriptors.to_file_name(descriptor) + ".json",
      )
      if not os.path.exists(file_path):
          expected_json = json.dumps(expected, indent=2)
          raise ValueError(
              f"Missing checkpoint file: {file_path}\n\n"
              f"Expected:\n\n{expected_json}"
          )
  
      with open(file_path) as fp:
          actual = json.load(fp)
  
      self.assertEqual(expected, actual, msg=HOW_TO_REGENERATE)
  
file_path: dm-haiku/haiku/_src/integration/checkpoint_test.py
imports: import json
  import os
  from absl.testing import absltest
  from absl.testing import parameterized
  from haiku._src import test_utils
  from haiku._src.integration import checkpoint_utils
  from haiku._src.integration import descriptors
label_desc: Use image node_id 1 for calling the CheckpointTest obj's underlying member method code with example usage: obj.test_checkpoint_format(name, module_fn, shape, dtype) without return types