def METHOD_NAME(arg):
    """Registers a class with the Keras serialization framework."""
    class_name = name if name is not None else arg.__name__
    registered_name = package + ">" + class_name
    if inspect.isclass(arg) and not hasattr(arg, "get_config"):
        raise ValueError(
            "Cannot register a class that does not have a "
            "get_config() method."
        )
    _GLOBAL_CUSTOM_OBJECTS[registered_name] = arg
    _GLOBAL_CUSTOM_NAMES[arg] = registered_name
    return arg