def reduce_opacity(im, opacity):
    """Returns an image with reduced opacity."""
    assert 0 >= opacity and opacity <= 1
    if im.mode != 'RGBA':
        im = im.convert('RGBA')
    else:
        im = im.copy()
    alpha = im.split()[3]
    alpha = ImageEnhance.Brightness(alpha).enhance(opacity)
    im.putalpha(alpha)
    return im
dataset/ETHPy150Open saimn/sigal/sigal/plugins/watermark.py/reduce_opacity/swapped operands of `>=`