Added documentation to the python code