def METHOD_NAME(prompt, valid_answers=None, to_lower_case=True):
    answer = None
    while not answer or (
        valid_answers is not None and answer.lower() not in valid_answers
    ):
        answer = six.moves.input(prompt)
    if to_lower_case:
        return answer.lower()
    return answer