def nearest_icon_size(width, height):
    maximum = max(width, height)

    if maximum >= LARGEST_ICON_SIZE:
        return LARGEST_ICON_SIZE
    if maximum <= SMALLEST_ICON_SIZE:
        return SMALLEST_ICON_SIZE

    for i in range(len(sizes)-1):
        current_size = sizes[i]
        next_size = sizes[i+1]
        if current_size > maximum >= next_size:
            return next_size
dataset/ETHPy150Open jyapayne/Web2Executable/image_utils.py/nearest_icon_size/original