Check __model_cls__ attribute.

        :type attributes: dict

def check_model_cls(attributes):
        """Check __model_cls__ attribute.

        :type attributes: dict
        """
        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.")