@classmethod
def _build_model_check_base(model_class, cls):
    """ Check whether ``model_class`` can be extended with ``cls``. """
    if model_class._abstract and not cls._abstract:
        msg = (
            "%s transforms the abstract model %r into a non-abstract model. That class should either inherit from AbstractModel, or set a different '_name'."
            )
        raise TypeError(msg % (cls, model_class._name))
    if model_class._transient != cls._transient:
        if model_class._transient:
            msg = (
                "%s transforms the transient model %r into a non-transient model. That class should either inherit from TransientModel, or set a different '_name'."
                )
        else:
            msg = (
                "%s transforms the model %r into a transient model. That class should either inherit from Model, or set a different '_name'."
                )
        raise TypeError(msg % (cls, model_class._name))
