def select_option(options, message='', val=None):
    """ CLI selection given options. """
    
    while val not in options:
        val = input(message)
        if val not in options:
            logger.error('Invalid choice.')
    return val
CLI selection given options.
ISR/utils/utils.py