def paste(canvas, watermark):
    """Pastes the watermark in the middle of the canvas."""

    offset = tuple((x - y) // 2 for x, y in zip(canvas.size, watermark.size))
    canvas.paste(watermark, offset, watermark)
    return canvas