@hybrid_method
def is_commented_by_user(cls, user, mapper=None):
    mapper = (mapper or cls)
    return mapper.comments.any((Comment.user_id == user.id))
@hybrid_method
def is_commented_by_user(cls, user, mapper=None):
    mapper = (mapper or cls)
    return mapper.comments.any((Comment.user_id == user.id))