def select_completer(question):
    """generate a completer for a select choices case
    Parameters
    ----------
    question: ConcreteQuestion

    Returns
    -------
    function
        completer function for readline
    """
    def _completer(text, state):
        options = [choice for choice in question.choices if choice.startswith(text)]
        if state < len(options):
            return options[state]
        return None
    return _completer