def METHOD_NAME(file_path, size=None):
    """
    Turn given picture into a smaller version.
    """
    im = Image.open(file_path)
    if size is not None:
        (width, height) = size
        if height == 0:
            size = get_full_size_from_width(im, width)
    else:
        size = im.size
    im = make_im_bigger_if_needed(im, size)
    im = fit_to_target_size(im, size)
    im.thumbnail(size, Image.Resampling.LANCZOS)
    if im.mode == "CMYK":
        im = im.convert("RGBA")
    final = Image.new("RGBA", size, (0, 0, 0, 0))
    final.paste(
        im, (int((size[0] - im.size[0]) / 2), int((size[1] - im.size[1]) / 2))
    )
    final.save(file_path, "PNG")
    return file_path