def convert(value, converter):
if not callable(converter):<EOL><INDENT>fail("<STR_LIT>")<EOL><DEDENT>return converter(value)<EOL>
Converts a value with a given converter function.

        >>> convert("1", to_int)
        1
        >>> convert("0", to_int)
        0
        >>> convert("a", to_int)