def get_for_model(self, model):
        opts = model._meta
        key = (opts.app_label, opts.object_name.lower())
        try:
            ct = self.__class__._cache[key]
        except KeyError:
            # Load or create the ContentType entry. The smart_unicode() is 
            # needed around opts.verbose_name_raw because name_raw might be a
            # django.utils.functional.__proxy__ object.
            ct, created = self.get_or_create(
                app_label = opts.app_label,
                model = opts.object_name.lower(), 
                defaults = {'name': smart_unicode(opts.verbose_name_raw)},
            )
            self._add_to_cache(ct)
            
        return ct
Parse pytest output and group lines per section (Errors, failures,
dataset/ETHPy150Open dcramer/django-compositepks/django/contrib/contenttypes/models.py/ContentTypeManager.get_for_model--crossover with--dataset/ETHPy150Open okcompute/vim-python-tests-runner/compiler/runners/pytest.py/parse_sections