code: def check_model_cls(attributes):
          
          model_cls = attributes.get('__model_cls__')
          if model_cls is None:
              raise AttributeError("Attribute __model_cls__ is required.")
  
          if not issubclass(model_cls, models.DomainModel):
              raise TypeError("Attribute __model_cls__ must be subclass of "
                              "DomainModel.")
docs: Check __model_cls__ attribute.
  
          :type attributes: dict