  
  from django.apps import apps
  from django.contrib.contenttypes.models import ContentType
  from django.contrib.sessions.backends.db import SessionStore
  from django.db import models
  from django.db.models import Count
  from django.db.models.query_utils import (
      DeferredAttribute, deferred_class_factory,
  )
  from django.test import TestCase, override_settings
 
</s> remove from django.db.models.query_utils import (
    DeferredAttribute, deferred_class_factory,
)
 </s> add  </s> remove from django.apps import apps
 </s> add  </s> remove from django.test.utils import isolate_apps
 </s> add  </s> remove from django.db.models.query_utils import DeferredAttribute, InvalidQuery
 </s> add from django.db.models.query_utils import InvalidQuery </s> remove from django.db.models.query_utils import (
    DeferredAttribute, deferred_class_factory,
)
 </s> add 
  
  from django.apps import apps
  from django.contrib.contenttypes.models import ContentType
  from django.contrib.sessions.backends.db import SessionStore

  from django.db.models import Count
  from django.db.models.query_utils import (
      DeferredAttribute, deferred_class_factory,
  )
  from django.test import TestCase, override_settings
keep keep keep keep replace keep keep keep keep keep
 Fixed #26207 -- Replaced dynamic classes with non-data descriptors for deferred instance loading. 
tests/defer_regress/tests.py