          if kwargs:
              for prop in list(kwargs):
                  try:
                      if isinstance(getattr(self.__class__, prop), property):
                          setattr(self, prop, kwargs[prop])
                          del kwargs[prop]
                  except AttributeError:
                      pass
              if kwargs:
                  raise TypeError("'%s' is an invalid keyword argument for this function" % list(kwargs)[0])
 
</s> remove                 setattr(self, field.attname, val)
 </s> add                 if val is not DEFERRED:
                    setattr(self, field.attname, val) </s> remove                 setattr(self, field.name, rel_obj)
 </s> add                 if rel_obj is not DEFERRED:
                    setattr(self, field.name, rel_obj) </s> remove             # This slightly odd construct is so that we can access any
            # data-descriptor object (DeferredAttribute) without triggering its
            # __get__ method.
            if (field.attname not in kwargs and
                    (isinstance(self.__class__.__dict__.get(field.attname), DeferredAttribute) or
                        field.column is None)):
                # This field will be populated on request.
 </s> add             # Virtual field
            if field.attname not in kwargs and field.column is None: </s> remove                 model_cls = deferred_class_factory(self.model, skip)
            else:
                model_cls = self.model
 </s> add             model_cls = self.model
                        if kwargs[prop] is not DEFERRED:
                            setattr(self, prop, kwargs[prop])
          if kwargs:
              for prop in list(kwargs):
                  try:
                      if isinstance(getattr(self.__class__, prop), property):
                        if kwargs[prop] is not DEFERRED:
                            setattr(self, prop, kwargs[prop])
                          del kwargs[prop]
                  except AttributeError:
                      pass
              if kwargs:
                  raise TypeError("'%s' is an invalid keyword argument for this function" % list(kwargs)[0])
keep keep keep keep replace keep keep keep keep keep
 Fixed #26207 -- Replaced dynamic classes with non-data descriptors for deferred instance loading. 
django/db/models/base.py