def coerce(s):
if s.isdigit():<EOL><INDENT>return integer_type(s)<EOL><DEDENT>else:<EOL><INDENT>return s<EOL><DEDENT>
Coerce strings of digits into proper integers.

:param s: A string.
:returns: An integer (if coercion is possible) or the original string.