@staticmethod
    def MetaBuilder(*models):
        """Build a new model metaclass. The new metaclass is derived from Database.DefaultMeta,
        and it will add *models as base classes to a model class.
        """
        class InnerMeta(Database.DefaultMeta):
            """metaclass for model class, it will add *models as bases of the model class."""
            def __new__(cls, name, bases, attrs):
                bases = list(bases)
                bases.extend(models)
                seen = set()
                bases = tuple(base for base in bases if not base in seen and not seen.add(base))
                return Database.DefaultMeta.__new__(cls, name, bases, attrs)
        return InnerMeta
dataset/ETHPy150Open tylerlong/quick_orm/quick_orm/core.py/Database.MetaBuilder/original