Google interview question

1. How to write good handler for python api