A sample python code with unittests.