def METHOD_NAME(cls):
    def _get_attr(type_):
        return {
            k: v
            for k, v in inspect.getmembers(
                type_, lambda x: not (inspect.isroutine(x))
            )
            if not k.startswith("__")
        }
    def _merge(a, b):
        for kb in b:
            if kb in a:
                va = a[kb]
                vb = b[kb]
                if isinstance(va, dict) and isinstance(vb, dict):
                    _merge(va, vb)
                else:
                    a[kb] = b[kb]
            else:
                a[kb] = b[kb]
    names = []
    for k, v in sorted(
        cls._all_conf_by_name.items(), key=lambda x: -x[1].priority
    ):
        if hasattr(v, "to_dict"):
            _merge(cls._final_attrs, v.to_dict())
        else:
            _merge(cls._final_attrs, _get_attr(v))
        names.append(k)
    logger.info(f"override sequence is {' < '.join(names)}")
    cls._override_order = names
    conf = Configuration()
    for k, v in cls._final_attrs.items():
        conf.put(k, v)
    logger.info(f"conf after merge is {conf}")
    return conf