def do_overlays(img, overlays, overlay_tints, overlay_sources, overlay_sizes, overlay_positions):
    overlay_index = 0

    for overlay in overlays:

        try:
            overlay_tint = overlay_tints[overlay_index]
        except (IndexError, TypeError):
            overlay_tint = None

        if overlay_tint == "None":
            overlay_tint = None

        try:
            overlay_source = overlay_sources[overlay_index]
        except (IndexError, TypeError):
            overlay_source = 'static'

        try:
            overlay_size = overlay_sizes[overlay_index]
        except (__HOLE__, TypeError):
            overlay_size = None

        if overlay_size == "None":
            overlay_size = None

        try:
            overlay_position = overlay_positions[overlay_index]
        except (IndexError, TypeError):
            overlay_position = None

        if overlay_position == "None":
            overlay_position = None

        do_overlay(img, overlay, overlay_source, overlay_tint, overlay_size, overlay_position)
        overlay_index += 1
dataset/ETHPy150Open francescortiz/image/image/utils.py/do_overlays