def _ConvertInteger(value):
if isinstance(value, float):<EOL><INDENT>raise ParseError('<STR_LIT>'.format(value))<EOL><DEDENT>if isinstance(value, six.text_type) and value.find('<STR_LIT:U+0020>') != -<NUM_LIT:1>:<EOL><INDENT>raise ParseError('<STR_LIT>'.format(value))<EOL><DEDENT>return int(value)<EOL>
Convert an integer.

    Args:
      value: A scalar value to convert.

    Returns:
      The integer value.

    Raises:
      ParseError: If an integer couldn't be consumed.