def seam_carve(image, mode, mask=None):
"""
@:param image
@:param mode: 'horizontal shrink'
'vertical shrink'
'horizontal expand'
'vertical expand'
@:param mask
"""