code: def query_random(**kwargs):
          '''
          Return the random records of centain kind.
          '''
  
          if 'limit' in kwargs:
              limit = kwargs['limit']
          elif 'num' in kwargs:
              limit = kwargs['num']
          else:
              limit = 10
  
          kind = kwargs.get('kind', None)
  
          if kind:
              rand_recs = TabPost.select().where(
                  (TabPost.kind == kind) &
                  (TabPost.valid == 1)
              ).order_by(
                  peewee.fn.Random()
              ).limit(limit)
          else:
              rand_recs = TabPost.select().where(
                  TabPost.valid == 1
              ).order_by(
                  peewee.fn.Random()
              ).limit(limit)
          return rand_recf query_random(**kwargs):
          '''
          Return the random records of centain kind.
          '''
  
          if 'limit' in kwargs:
              limit = kwargs['limit']
          elif 'num' in kwargs:
              limit = kwargs['num']
          else:
              limit = 10
  
          kind = kwargs.get('kind', None)
  
          if kind:
              rand_recs = TabPost.select().where(
                  (TabPost.kind == kind) &
                  (TabPost.valid == 1)
              ).order_by(
                  peewee.fn.Random()
              ).limit(limit)
          else:
              rand_recs = TabPost.select().where(
                  TabPost.valid == 1
              ).order_by(
                  peewee.fn.Random()
              ).limit(limit)
          return rand_recs
docs: Return the random records of centain kind.