code: def limit(lower, upper):
      
      offset = lower or 0
      lim = (upper - offset) if upper else -1
      smt = 'LIMIT %d OFFSET %d' % (lim, offset)
      return smt, ()
docs: Returns a SQlite-compliant LIMIT statement that
      takes the *lower* and *upper* bounds into account.
  
      :param lower: The lower bound.
      :param upper: The upper bound.