def __new__(cls, name, bases, attrs):
        try:
            app_label = attrs['Meta'].app_label
        except __HOLE__:
            module_name = attrs["__module__"]
            app_label = module_name.split('.')[-2]
        extensions = _find_extensions(app_label, name)
        bases = tuple(extensions) + bases

        return super(ExtensibleModelBase, cls).__new__(
            cls, name, bases, attrs)
dataset/ETHPy150Open rapidsms/rapidsms/rapidsms/models.py/ExtensibleModelBase.__new__