search engine class ta python code