This issue is to add type annotations to the code, so that it can be used with static analysis checkers like MyPy.