def register(self, thing, subclass=True):
        name = thing.__name__

        if name in self.elements:
            raise RegisterError('"%s" model already registered on "%s"' % (
                name, self.module.__name__
            ))

        new = thing if not subclass else self._subclass(thing)

        self.elements[name] = new
        setattr(self.module, name, new)
dataset/ETHPy150Open jqb/django-settings/django_settings/moduleregistry.py/ModuleRegistry.register/original