def METHOD_NAME(cls, clz, priority=None):
    if priority is not None:
        setattr(clz, "priority", priority)
    name = clz.__name__
    if name in cls._all_conf_by_name:
        logger.warning(
            f"class {name} has been created, we will override it"
        )
    if not hasattr(clz, "priority"):
        setattr(clz, "priority", cls._default_priority)
        cls._default_priority -= 1
    if hasattr(clz, "build"):
        clz.build()
    cls._all_conf_by_name[name] = clz