def METHOD_NAME(self):
    @object_registration.register_keras_serializable(
        "TestPackage", "CustomName"
    )
    class OtherTestClass:
        def __init__(self, val):
            self._val = val
        def get_config(self):
            return {"val": self._val}
        @classmethod
        def from_config(cls, config):
            return cls(**config)
    serialized_name = "TestPackage>CustomName"
    inst = OtherTestClass(val=5)
    class_name = object_registration.GLOBAL_CUSTOM_NAMES[OtherTestClass]
    self.assertEqual(serialized_name, class_name)
    fn_class_name = object_registration.get_registered_name(OtherTestClass)
    self.assertEqual(fn_class_name, class_name)
    cls = object_registration.get_registered_object(fn_class_name)
    self.assertEqual(OtherTestClass, cls)
    config = keras_core.saving.serialize_keras_object(inst)
    self.assertEqual("OtherTestClass", config["class_name"])
    new_inst = keras_core.saving.deserialize_keras_object(config)
    self.assertIsNot(inst, new_inst)
    self.assertIsInstance(new_inst, OtherTestClass)
    self.assertEqual(5, new_inst._val)