code: func (c *Cursor) Prev() (key []byte, value []byte) {
  	_assert(c.bucket.tx.db != nil, "tx closed")
  
  	// Attempt to move back one element until we're successful.
  	// Move up the stack as we hit the beginning of each page in our stack.
  	for i := len(c.stack) - 1; i >= 0; i-- {
  		elem := &c.stack[i]
  		if elem.index > 0 {
  			elem.index--
  			break
  		}
  		c.stack = c.stack[:i]
  	}
  
  	// If we've hit the end then return nil.
  	if len(c.stack) == 0 {
  		return nil, nil
  	}
  
  	// Move down the stack to find the last element of the last leaf under this branch.
  	c.last()
  	k, v, flags := c.keyValue()
  	if (flags & uint32(bucketLeafFlag)) != 0 {
  		return k, nil
  	}
  	return k, v
  }
docs: // Prev moves the cursor to the previous item in the bucket and returns its key and value.
  // If the cursor is at the beginning of the bucket then a nil key and value are returned.
  // The returned key and value are only valid for the life of the transaction.