def get_intermediate_model_meta_class(self, klass, from_field_name,
                                          to_field_name,
                                          sort_value_field_name):
        managed = True
        to_model = self.rel.to
        if isinstance(self.rel.to, six.string_types):
            if self.rel.to != RECURSIVE_RELATIONSHIP_CONSTANT:
                def set_managed(field, model, cls):
                    field.rel.through._meta.managed = model._meta.managed or cls._meta.managed
                add_lazy_relation(klass, self, to_model, set_managed)
            else:
                managed = klass._meta.managed
        else:
            managed = klass._meta.managed or to_model._meta.managed

        options = {
            'db_table': self._get_m2m_db_table(klass._meta),
            'managed': managed,
            'auto_created': klass,
            'app_label': klass._meta.app_label,
            'db_tablespace': klass._meta.db_tablespace,
            'unique_together': ((from_field_name, to_field_name),),
            'ordering': (sort_value_field_name,),
            'verbose_name': '%(from)s-%(to)s relationship' % {'from': from_field_name, 'to': to_field_name},
            'verbose_name_plural': {'from': from_field_name, 'to': to_field_name} % '%(from)s-%(to)s relationships',
        }
        # Django 1.6 support.
        if hasattr(self.model._meta, 'apps'):
            options.update({
                'apps': self.model._meta.apps,
            })
        return type(str('Meta'), (object,), options)
dataset/ETHPy150Open gregmuellegger/django-sortedm2m/sortedm2m/fields.py/SortedManyToManyField.get_intermediate_model_meta_class/swapped operands of `%`