def METHOD_NAME(image_display_mode_str: str) -> ImageDisplayMode:
    for idm in ImageDisplayMode:
        if image_display_mode_str.lower() == idm:
            return idm
    if image_display_mode_str:  # empty is OK, but typos should not go unnoticed.
        warnings.warn(
            f"Unknown image display mode '{image_display_mode_str}', falling back to the default.",
            UserWarning,
            stacklevel=2,
        )
    return ImageDisplayMode.SIMPLE_GEOLOCATED  # this is the default