def METHOD_NAME(prompt):
    if prompt in called:
        raise AssertionError('answer for %r missing and no default '
                             'present' % prompt)
    called.add(prompt)
    for question in answers:
        if prompt.startswith(qs.PROMPT_PREFIX + question):
            return answers[question]
    if needanswer:
        raise AssertionError('answer for %r missing' % prompt)
    return ''