def _wrapper(func):
@functools.wraps(func)<EOL>def the_func(expr):<EOL><INDENT>"""<STR_LIT>"""<EOL>try:<EOL><INDENT>return func(expr)<EOL><DEDENT>except (TypeError, ValueError) as err:<EOL><INDENT>raise IntoDPValueError(expr, "<STR_LIT>", "<STR_LIT>")from err<EOL><DEDENT><DEDENT>return the_func<EOL>
Wraps a generated function so that it catches all Type- and ValueErrors
and raises IntoDPValueErrors.

:param func: the transforming function