def _make_mixin_class(klass):
    global _mixin_classes

    if klass not in _mixin_classes:
        class MixedInQuerySet(QuerySetMixin, klass):
            pass

        if six.PY2:
            MixedInQuerySet.__name__ = b'MySQL' + klass.__name__
        else:
            MixedInQuerySet.__name__ = 'MySQL' + klass.__name__
        _mixin_classes[klass] = MixedInQuerySet
    return _mixin_classes[klass]
dataset/ETHPy150Open adamchainz/django-mysql/django_mysql/models/query.py/_make_mixin_class/original