Typescript Reduce Sum Python Function Docstring