def collect_report(self):
        indexes = []

        for app in settings.INSTALLED_APPS:
            try:
                mod = importlib.import_module(app)
            except __HOLE__:
                warnings.warn('Installed app %s is not an importable Python module and will be ignored' % app)
                continue

            try:
                report_module = importlib.import_module("%s.reports" % app)
            except ImportError:
                if module_has_submodule(mod, 'reports'):
                    raise
                continue

            for item_name, item in inspect.getmembers(report_module,
                                                      inspect.isclass):
                if getattr(item, 'get_queryset', None) and item_name != "Mining":
                    indexes.append(item().get_queryset())
                elif getattr(item, 'model', None) and item_name != "Mining":
                    indexes.append(item().model.objects.all())

        return indexes
dataset/ETHPy150Open mining/django-report/report/management/commands/update_report.py/Command.collect_report