def get_last_tid(self):
        try:
            spec = {'tid': {'$gt': 0}}
            sort = [('tid', -1)]
            row = self.db.docs.find_one(spec, sort=sort)
        except Exception as e:
            raise DatabaseException(e)
        if row:
            return row['tid']
        return 0
async def pre_process(self, message, data):
        """
        context language variable will be set each time when update from 'process_update_types' comes
        value is the result of 'get_user_language' method
        """
        self.context_lang.set(await self.get_user_language(obj=message))