code: def _assign_kwargs(self, kwargs):
      
      for k in kwargs:
          if not hasattr(self, k):
              raise AttributeError(k, 'Not valid for', self.__class__.__name__)
          setattr(self, k, kwargs[k])
docs: Assigns all keyword arguments to a given instance, raising an exception
      if one of the keywords is not already the name of a property.