committing moving assert statements out of the function into __name__==__main__ block and adding comments