code: def add_or_update(self, app_id):
          '''
          Add or update the category.
          '''
          logger.info('Collect info: user-{0}, uid-{1}'.format(self.userinfo.uid, app_id))
          MCollect.add_or_update(self.userinfo.uid, app_id)
          out_dic = {'success': True}
          return json.dump(out_dic, selff add_or_update(self, app_id):
          '''
          Add or update the category.
          '''
          logger.info('Collect info: user-{0}, uid-{1}'.format(self.userinfo.uid, app_id))
          MCollect.add_or_update(self.userinfo.uid, app_id)
          out_dic = {'success': True}
          return json.dump(out_dic, self)
docs: Add or update the category.