def to_numeric(arg):
if isinstance(arg, str):<EOL><INDENT>if '<STR_LIT:.>' in arg:<EOL><INDENT>return float(arg)<EOL><DEDENT>else:<EOL><INDENT>return int(arg)<EOL><DEDENT><DEDENT>return arg<EOL>
Converts a string either to int or to float.
This is important, because e.g. {"!==": [{"+": "0"}, 0.0]}