code: def test_invalid_registration(self):
      with self.assertRaisesRegex(TypeError, "must be string"):
          registration.register_checkpoint_saver(
              package=None,
              name="test",
              predicate=lambda: None,
              save_fn=lambda: None,
              restore_fn=lambda: None,
          )
      with self.assertRaisesRegex(TypeError, "must be string"):
          registration.register_checkpoint_saver(
              name=None,
              predicate=lambda: None,
              save_fn=lambda: None,
              restore_fn=lambda: None,
          )
      with self.assertRaisesRegex(
          ValueError, "Invalid registered checkpoint saver."
      ):
          registration.register_checkpoint_saver(
              package="package",
              name="t/est",
              predicate=lambda: None,
              save_fn=lambda: None,
              restore_fn=lambda: None,
          )
      with self.assertRaisesRegex(
          ValueError, "Invalid registered checkpoint saver."
      ):
          registration.register_checkpoint_saver(
              package="package",
              name="t/est",
              predicate=lambda: None,
              save_fn=lambda: None,
              restore_fn=lambda: None,
          )
      with self.assertRaisesRegex(
          TypeError,
          "The predicate registered to a checkpoint saver must be callable",
      ):
          registration.register_checkpoint_saver(
              name="test",
              predicate=None,
              save_fn=lambda: None,
              restore_fn=lambda: None,
          )
      with self.assertRaisesRegex(
          TypeError, "The save_fn must be callable"
      ):
          registration.register_checkpoint_saver(
              name="test",
              predicate=lambda: None,
              save_fn=None,
              restore_fn=lambda: None,
          )
      with self.assertRaisesRegex(
          TypeError, "The restore_fn must be callable"
      ):
          registration.register_checkpoint_saver(
              name="test",
              predicate=lambda: None,
              save_fn=lambda: None,
              restore_fn=None,
          )
  
imports: from absl.testing import parameterized
  from tensorflow.python.eager import test
  from tensorflow.python.saved_model import registration
  from tensorflow.python.trackable import base
label_desc: Use image node_id 1 for calling the CheckpointSaverRegistrationTest obj's underlying member method code with example usage: obj.test_invalid_registration() without return types