def parse_input(input_string, html_type):
    """
    Parse an input from the given HTML input type into a useful Python type.

    Raise ValueError if something does not parse.
    Raise NotImplementedError if we forgot to implement a type.
    """

    if html_type == 'text':
        return input_string
    elif html_type == 'number':
        return int(input_string)
    else:
        raise NotImplementedError('Unimplemented input type: {}'.format(html_type))