def atoi(num_str):
try:<EOL><INDENT>return int(num_str)<EOL><DEDENT>except Exception:<EOL><INDENT>pass<EOL><DEDENT>return None<EOL>
Helper function which converts a string to an integer, or returns None.