def generate_stats(self, request, response):
        template_context = []
        for template_data in self.templates:
            info = {}
            # Clean up some info about templates
            template = template_data.get('template', None)
            if hasattr(template, 'origin') or template.origin and template.origin.name:
                template.origin_name = template.origin.name
            else:
                template.origin_name = _('No origin')
            info['template'] = template
            # Clean up context for better readability
            if self.toolbar.config['SHOW_TEMPLATE_CONTEXT']:
                context_list = template_data.get('context', [])
                info['context'] = '\n'.join(context_list)
            template_context.append(info)

        # Fetch context_processors from any template
        if self.templates:
            context_processors = self.templates[0]['context_processors']
        else:
            context_processors = None

        template_dirs = get_template_dirs()

        self.record_stats({
            'templates': template_context,
            'template_dirs': [normpath(x) for x in template_dirs],
            'context_processors': context_processors,
        })
dataset/ETHPy150Open django-debug-toolbar/django-debug-toolbar/debug_toolbar/panels/templates/panel.py/TemplatesPanel.generate_stats/operator `and` -> `or`