@classmethod
def create_model_class(cls, name, table_name, attrs, validations=None, *,
    otherattrs=None, other_bases=None):
    """Creates a new class derived from ModelBase."""
    members = dict(table_name=table_name, attrs=attrs, validations=
        validations or [])
    if otherattrs:
        members.update(otherattrs)
    return type(name, other_bases or (), members)
