def _validate(value, optdict, name="<STR_LIT>"):
try:<EOL><INDENT>_type = optdict["<STR_LIT:type>"]<EOL><DEDENT>except KeyError:<EOL><INDENT>return value<EOL><DEDENT>return _call_validator(_type, optdict, name, value)<EOL>
return a validated value for an option according to its type

    optional argument name is only used for error message formatting