use assert function instead of python keyword
updated the comment.