Typescript Nested Functions In Python W3schools