Why do we need unit test? And how to write it in Python?