<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def get_top_keywords(self, up=True):
        '''Get top keywords for all the categories'''
        engine = models.postgres_engine()
        session = models.create_session(engine)
        #threadPool = ThreadPool(5)
        for cat in session.query(models.Category):
            if not cat.level: continue
            self.cat_top_keywords(session, cat, up)