@classmethod
def from_primary_keys(cls, **pks):
    """ return the instance of the model from the primary keys

        :param **pks: dict {primary_key: value, ...}
        :rtype: instance of the model
        """
    where_clause = cls.get_where_clause_from_primary_keys(**pks)
    query = cls.query().filter(*where_clause)
    if query.count():
        return query.first()
    return None
