def METHOD_NAME(optimizer_type, framework):
    """Class decorator used to register all Optimizer subclasses.
       Cross framework optimizer is supported by add param as framework='tensorflow, pytorch'
    Args:
        optimizer_type (str): The string of supported criterion.
        framework (str): The string of supported framework.
    Returns:
        cls: The class of register.
    """
    def decorator_optimizer(cls):
        for fw in [fwk.strip() for fwk in framework.split(",")]:
            assert fw in ["tensorflow", "pytorch"], "The framework support tensorflow pytorch"
            if optimizer_type in registry_optimizers[fw].keys():
                raise ValueError("Cannot have two optimizers with the same name")
            registry_optimizers[fw][optimizer_type] = cls
        return cls
    return decorator_optimizer